LDAP & JNDI

I'm using the following text in my dn entry while trying to access an LDAP server:
oEnv.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
oEnv.put(javax.naming.Context.PROVIDER_URL, m_sProviderUrl);
oEnv.put(javax.naming.Context.SECURITY_AUTHENTICATION, "simple");
oEnv.put(javax.naming.Context.SECURITY_PRINCIPAL, "uid=user1,dc=domain,dc=com");
oEnv.put(javax.naming.Context.SECURITY_CREDENTIALS, sPassword);
This does not work... But if I change the "uid" with "cn":
(javax.naming.Context.SECURITY_PRINCIPAL, "cn=First Last,dc=domain,dc=com");
I can access the LDAP server, and the authorization is successful.. Any idea why is that?
Am I doing something wrong in accessing the LDAP server? Or is there something not configured correctly on my LDAP server??

beavis,
If you just want to authenticate the user maybe you could lookup the user's cn first(by using any already authenticated user whose cn is known), then authenticate again using the cn of the user to compose a distinguished name.
I use kerberos to authenticate with the AD and the user's Windows login id would be used instead.....
I use the following code to search for a particular user instead of looping around....
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://company.com");
env.put(Context.SECURITY_AUTHENTICATION, "GSSAPI");
try
DirContext ctx = new InitialDirContext(env);
* user login id "userid" for searching
String filterString = "sAMAccountName=" + userid;
* specify your interested attributes for the return user
String[] returnAttr = { "cn", "sAMAccountName" };     
StringBuffer filterBuffer = new StringBuffer(filterString);
SearchControls ctls = new SearchControls();
ctls.setReturningAttributes(returnAttr);
ctls.setSearchScope(SearchControls.SUBTREE_SCOPE);
* userSearchBase is the distinguished name of the starting OU from where your
* user will be searched.
* e.g. "ou=People, dc=company, dc=com"
NamingEnumeration results = ctx.search(userSearchBase, filterString, ctls);
if ( results != null && results.hasMore() )
Wish that could be helpful....

Similar Messages

  • LDAP JNDI bootstrap info at each cluster node

    Any suggestions on the best way to distribute LDAP JNDI bootstrap
              information (host:port/DN/pwd/searchbase) to each node in the cluster? I've
              thought of deploying individual bootstrap files, but then I'd have to
              encrypt them and I don't like the idea of these files authentication files
              laying around on (potentially) distributed hosts. Clustered EJBs could use
              an abstraction layer that hides this stuff from them, but the abstraction
              layer needs the bootstrap info before accessing LDAP through JNDI.
              I feel like there's some simple, elegant manner of doing this, but I'm
              missing it because my head is full of LDAP searchbases and filter syntax....
              

    Any suggestions on the best way to distribute LDAP JNDI bootstrap
              information (host:port/DN/pwd/searchbase) to each node in the cluster? I've
              thought of deploying individual bootstrap files, but then I'd have to
              encrypt them and I don't like the idea of these files authentication files
              laying around on (potentially) distributed hosts. Clustered EJBs could use
              an abstraction layer that hides this stuff from them, but the abstraction
              layer needs the bootstrap info before accessing LDAP through JNDI.
              I feel like there's some simple, elegant manner of doing this, but I'm
              missing it because my head is full of LDAP searchbases and filter syntax....
              

  • LDAP JNDI Error

    Hi all,
    I am trying to just print out fields from JNDI Module Groups which are inside Active Directory. The following is the code I use:-
    for each ad in User
    do
    logMessage "Entered User Name IF loop"
    logMessage " User Name =====: " + ad.givenName
    logMessage" User Name =====: " + ad.uid
    logMessage " User Name =====: " + ad.userPrincipalName
    //requestedByLastName = ad.givenName
    end
    I get the following error:-
    The method 'Person' from class 'Person_Details.Default_1_0.Instance' could not be successfully executed.
    Caused by: [LDAP: error code 4 - Sizelimit Exceeded]
    Could anyone please let me know what exactly is this error because I am doing nothing but printing out values from the AD to ALBPM logMessages..

    Aaaarrgghhhh....
    In your code you have
    // Get all the attributes of named object
    Attributes answer = ctx.getAttributes( "cn=*anna*");If you are just retrieving an object rather than performing a search, you need to use the full distinguished name which means it will be something like:
    Attributes answer = ctx.getAttributes( "cn=Anna,ou=People,dc=osu,dc=edu");And if you ever get around to writing code that performs a search, DO NOT use a search filter of the form:
    "cn=*Anna*"as your query ends up just being a stupid wild card query and will probably not be able to take advantage of any indexes that are present on the DIT.
    You queries will time out and you network admins will become quite angry.

  • LDAP JNDI Tomcat 6 Realm

    I am trying to use a JNDIRealm in Tomcat 6 to connect to an active directory server. My server.xml realm tag looks like:
    <Realm className="org.apache.catalina.realm.JNDIRealm" connectionName="CN=M123456,OU=Users,OU=NNN,DC=nnnn,DC=nnnnnn,DC=org" connectionPassword="xxxxxxxx" connectionURL="ldap://xxxxxx.xxxxxxxx.xxx:389" userPattern="CN={0}, OU=Users, OU=NNN, DC=nnnn, DC=nnnnn, DC=org" />
    When I test my application on my local server, my user name and password don't work. I get no error messages in my local server console. Any ideas on how to debug or correct?
    My LDAP information looks like (with selected values shown after "->" symbol):
    cn=M123456, OU=NNN, DC=nnnn, DC=nnnnnn, dc=org
    homeMDB
    badPasswordTime
    badPwdCount
    objectGUID
    telephoneNumber
    msExchHomeServerName
    st
    msExchMailboxGuid
    whenChanged
    info
    name -> M123456
    physicalDeliveryOffice Name
    lastLogon
    departmentNumber
    accountExpires
    employeeID
    description
    primaryGroupID
    employeeNumber
    homeMTA
    legacyExchangeDN
    userPrincipalName -> [email protected]
    sAMAccountName -> M123456
    showInAddressBook
    uSNCreated
    mailNickname
    l
    businessCategory
    msExchPolicesIncluded
    pwdLastSet
    mDBUseDefaults
    logonCount
    countryCode
    distinguishedName -> CN=M123456,OU=Users,OU=NNN, DC=nnnn, DC=nnnnnn, DC=org
    homeDirectory -> \\nnnn.nnnnn.org\nnnhome\users20m2\M123456
    msExhOmaAdminWirelessEnable
    memberOf
    msExhALObjectVersion
    whenCreated
    userParameters
    serialNumber
    proxyAddresses
    sn
    givenName
    codePage
    homeDrive
    objectClass
    employeeType
    textEncodedORAddress
    cn -> M123456
    instanceType
    initials
    msNPAllowDialin
    uid -> M123456
    displayName
    objectCategory
    sAMAccountType
    uSNChanged
    title
    objectSid
    msExchMailboxSecurityDescriptor
    mail
    userAccountControl
    lastLogonTimestamp
    msExchUserAccountControl
    scriptPath

    Hi All,
    I've worked out the problem... It was all to do with Vista / Windows 2008 TCP Auto-Tuning. See this article.
    Cheers,
    Steve

  • JAAS and JNDI (LDAP)

    Hello,
    I am using JAAS to connect to a Active Directory and login successfully (Authentication of the user). After the login, I want to get the users property like email address, phone number, ... from the Active Directory using JNDI. As I understand, to get connected to the AD with JNDI I have to use someting like:
    env.put(Context.SECURITY_AUTHENTICATION,"simple");
    env.put(Context.SECURITY_PRINCIPAL,ldapUserName);
    env.put(Context.SECURITY_CREDENTIALS,ldapUserPassword);
    My Problem is now, that I would like to take the user, which has connected to the AD with JASS for accessing the AD, but I do not have the ldapUserPassword from the JAAS Principal (the logged on user).
    Is ther a way to use the current logged in user as LDAP (JNDI) user, or another way, to access the requested proeprties?
    Thanks and Regards
    Stefan

    If had excatly the same problem.
    In my my case I had a domain "testdomain.mycompany.com" and a domain controller "domaincontroller.mycompany.com" (maybe this is a misconfiguration?)
    So I have set in the kerberos config file
    [realms]
            TESTDOMAIN.MYCOMPANY.COM = {
                    kdc = domaincontroller.mycompany.com
            }and the lpad connection url to "ldap://domaincontroller.mycompany.com/dc=testdomain,dc=mycompany,dc=com
    This resulted in the error you have descibed.
    Finally I put the following entry in the hosts file on my local PC
    192.168.0.10 domaincontroller.testdomain.mycompany.com (192.168.0.10 is the ip address of the domain controller) and then it worked!

  • JNDI / LDAP quick start guide

    Does anyone know where i can get a PDf/other document that explains simply LDAP & JNDI and how to use there functions. I can;t find a decent one anywhere
    I found one but it was very poorly written and was far too hard to understand (i know JDBC)
    Thanks

    Have you looked at the JNDI Tutorial at http://java.sun.com/products/jndi/tutorial/? It walks you through connecting to an LDAP resource.

  • How to define JDNI resource to look up from ldap root

    Hi ,
    Can someone please help? I am stuck....
    In my application, I need to perform some modification which requires fully distinguished name. At the moment the jndi resource configurated using jndi-lookup-name="dc=actd,dc=admin,dc=misk,dc=com,dc=au" so the modification won't work because everything is started from "dc=actd,dc=admin,dc=misk,dc=com,dc=au".
    Is there a way, I can tell LdapContext to start from root, not from "dc=actd,dc=admin,dc=misk,dc=com,dc=au"? I don't think so but maybe I am wrong.
    On the other hand, how can I configurate the jndi resource so it lookup from root ?
    In my case, I am using SunOne application server to configurate external resource for the ldap. jndi-lookup-name is a compulsory field. I have tried to put "/" into it but doesn't work.
    <external-jndi-resource enabled="true" factory-class="com.sun.jndi.ldap.LdapCtxFactory" jndi-lookup-name="dc=actd,dc=admin,dc=misk,dc=com,dc=au" jndi-name="active_directory_misk" res-type="javax.naming*ldap.LdapContext">
    <description>connect to AD ldap port</description>
    <property name="java.naming.provider.url" value="ldap://129.94.154.22:389"/>
    <property name="java.naming.security.authentication" value="simple"/>
    <property name="java.naming.security.principal" value="Username"/>
    <property name="java.naming.security.credentials" value="password"/>
    </external-jndi-resource>
    Without using JNDI resource as following, it works. But I need to use the external jndi resource for the application. How do I configure the JNDI resource to do the same thing?
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    env.put(Context.PROVIDER_URL, "ldap://129.94.154.22:389/");
    env.put(Context.SECURITY_CREDENTIALS, "password");
    env.put(Context.SECURITY_PRINCIPAL, "username");
    LdapContext ldapCtx = new InitialLdapContext(env, null);
    Any ideas? Thank you very much in advance
    Tara

    Hi,
    If you remove the $ and braces (as shown below) it will work.
    <data-source-aliases>
    <aliases>
    <data-source-name>MYDS</data-source-name>
    <alias>BRANCH50DS</alias>
    </aliases>
    </data-source-aliases>
    Regards,
    S.Divakar

  • Adding a user in Active Directory

    Hi fellows,
    I am having a serious problem in creating a new user in active directory. i am using LDAP JNDI code. I can delete and update users attributes, but fail to create users.
    ctx.createSubcontext("newuser,full domain", attributes);
    when i specify a new user in "newuser" it gives exception invalidnameexception. I don't understand how to create a new entry within the directory structure of predefined tree. by the way, i can create users by active directory explorer but java application is giving exceptions.
    Any help will be highly appreciated.

    A DistinguishedName is of the form e.g. "cn=username, ou=Users,dc=hostname,dc=com". In other words it contains attribute names and values for each name component. Evidently your DN doesn't do that.

  • Not able to connect to Active Directory through Topology manager of ODI

    Hi,
    We are trying to connect to Active Directory though ODI Topology manager.
    The details given are :
    +1. Using LDAP(JNDI) driver:+
    username : CN=Administrator
    JDBC Driver name : com.sun.jndi.ldap.LdapCtxFactory
    JDBC URL : ldap://ten.mydomain.com:636/dc=oracle,dc=com
    I am getting the error as shown below:
    java.sql.SQLException: No suitable driver
         at java.sql.DriverManager.getDriver(Unknown Source)
         at com.sunopsis.sql.SnpsConnection.u(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.a(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
         at com.sunopsis.sql.SnpsConnection.testConnection(SnpsConnection.java)
    *2. Sunopsis JDBC driver for LDAP:*
    Username: cn=Administrator
    JDBC Driver Name : com.sunopsis.ldap.jdbc.driver.SnpsLdapDriver
    JDBC Driver URL :
    jdbc:snps:ldap?ldap_url=ldap://ten.mydomain.com:636/&ldap_password=abcd1234&ldap_basedn=dc=oracle,dc=com
    We also tried with URL : jdbc:snps:ldap?ldap_url=ldap://ten.mydomain.com:636/&ldap_basedn=dc=oracle,dc=com
    We are getting an error as shown below:
    Java.sql.SQLException: A NamingException occured saying: Request: 1 cancelled with this explanation: Request: 1 cancelled and this remaining name: null
         at com.sunopsis.ldap.jdbc.driver.i.e(i.java)
         at com.sunopsis.ldap.jdbc.driver.i.a(i.java)
         at com.sunopsis.ldap.jdbc.driver.SnpsLdapConnection.<init>(SnpsLdapConnection.java)
    Did I misconfigure something? Do I need to install a seperate Driver for this?
    Please help me out in this.
    Thanks in advance for any help.

    For LDAP default user Root is having all the priviledge to access all the Ldap data.
    Go to physical architecture and insert a new dataserver
    user - cn=root,dc=css,dc=hyperion,dc=com [ change this  according to your requirememnt  for you it will be   *cn=Administrator ,dc=oracle,dc=com* ]
    password - null
    JDBC
    jdbc driver : com.sunopsis.ldap.jdbc.driver.SnpsLdapDriver
    jdbc url : jdbc:snps:ldap?ldap_url=ldap://<server name :port/&ldap_password=KLLEJMNLKFLBKLKODDGPGPDB&ldap_basedn=dc=css,dc=hyperion,dc=com
    [  for you it will be  *jdbc:snps:ldap?ldap_url=ldap://ten.mydomain.com:636/&ldap_password=<encoded password>ldap_basedn=dc=oracle,dc=com* ]
    Here the Default Ldap password for ROOT is SECURITY and if its changed or you are using for some other user . Please use that .
    you also need to encode the password using this command
    java -cp C:\OraHome_1\oracledi\drivers\snpsldapo.jar com.sunopsis.ldap.jdbc.driver.SnpsLdapEncoder <enter password here>
    Later test the connection and you should be able to connect successfully.
    Thanks

  • Configure/Access remote Message Queue (Open MQ)

    Hi,
    I am new to JMS and Message Queue. I have installed Sun's Open Message Queue on my system.I have created ObjectStore and Destination(Queue) and using java program to insert and fetch messages.
    Following are the details:
    1. Created ObjectStore MyObjectStore with following properties:-
    java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    java.naming.provider.url=file:///c:/tmp
    2. Created ConnectionFactory MyConnectionFactory and Destination MyQueue
    3. Code to access above queue:
    Hashtable env;
        Context     ctx = null;
        env = new Hashtable();
        env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.fscontext.RefFSContextFactory");
        env.put(Context.PROVIDER_URL, "file:///c:/tmp");
        ConnectionFactory cf=(javax.jms.ConnectionFactory) ctx.lookup("MyConnectionFactory");
        Queue queue=(javax.jms.Queue)ctx.lookup("MyQueue");
        Connection connection = cf.createConnection();
        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        MessageProducer msgProducer = session.createProducer(queue);
        MessageConsumer msgConsumer = session.createConsumer(queue);
        ....................My problem is that I am able to access Message Queue on local machine only. I don't know how i can configure my MQ to be accessed on network or/and how to look up for MQ from a remote machine in network.
    Can anybody help me on this.
    Regards
    Edited by: Arpit.Purohit on Apr 8, 2009 4:49 AM
    Edited by: Arpit.Purohit on Apr 8, 2009 4:49 AM

    Arpit,
    Yes, this is because you have chosen to use com.sun.jndi.fscontext.RefFSContextFactory as the JNDI provider in which to store your destination and connection factory objects.
    The Sun Java System Message Queue 4.3 Administration Guide has a section [File-System Object Stores|http://docs.sun.com/app/docs/doc/820-6740/aeogx?a=view] about this:
    +"Message Queue ... supports the use of a directory in the local file system as an object store for administered objects. While this approach is not recommended for production systems, it has the advantage of being very easy to use in development environments. Note, however, that for a directory to be used as a centralized object store for clients deployed across multiple computer nodes, all of those clients must have access to the directory. In addition, any user with access to the directory can use Message Queue administration tools to create and manage administered objects"+
    So if you place your JNDI store in a shared directory visible to other machines rather than C:/tmp you will be able to access it from other machines.
    The ideal solution is to use an LDAP JNDI provider. See the section [LDAP Server Object Stores|http://docs.sun.com/app/docs/doc/820-6740/aeogw?a=view] in the Administration Guide.
    Note that this issue relates to the administered objects used by MQ only. The MQ broker itself will be available from anywhere on the network and the messages themselves will stored in the broker's own message store.
    Nigel

  • MQ 5.3 and WLS 8.1

              I want to use MQ 5.3 from WLS 8.1 MDBs. Seems like I can
              a) configure MQ as a foreign jms service, or
              b) use a JMS bridge.
              Is there a difference? From the documentation it seems as though the bridge offers
              superior transactional semantics. If I use a bridge do I configure MQ to register
              objects in some other local file or LDAP JNDI repository, then bridge from that
              JNDI to WLS JNDI?
              I'm confused about this whole thing, so I apologize if my question doesn't make
              sense. Does anyone have an explicit example they can share?
              Thanks,
              Jay
              

    Hi Jay,
              - Unless your intent is to allow MDBs to continue
              processing backlogged messages while MQ is
              off-line, there is usually little reason
              to use a bridge. A bridge
              introduces an extra hop which increases latency and
              may decrease performance.
              - I assume you will also want to send from WL
              to MQ. If so, look into the new 8.1 resource
              reference wrapper feature as it helps simplify
              this task. You may want to bridge from
              a local dest to MQ instead,
              for the same reasons as one would bridge in
              the inbound direction - to allow message
              processing to continue even if MQ is down...
              - If you use the bridge there is no need to
              configure foreign destination or connection
              factory "wrappers", as you can specify
              the MQ URL, CF name, and dest name directly in
              the bridge configuration. Ditto for MDB
              descriptors. But foreign wrappers are nice for
              MDBs as then the MQ URL, CF name,
              and dest name no longer need to be hard-coded
              into the MDB and instead reside in the config.xml...
              - I'm attaching some notes I have on
              integration which contains some additional information.
              Tom
              jay philoon wrote:
              > I want to use MQ 5.3 from WLS 8.1 MDBs. Seems like I can
              > a) configure MQ as a foreign jms service, or
              > b) use a JMS bridge.
              >
              > Is there a difference? From the documentation it seems as though the bridge offers
              > superior transactional semantics. If I use a bridge do I configure MQ to register
              > objects in some other local file or LDAP JNDI repository, then bridge from that
              > JNDI to WLS JNDI?
              >
              > I'm confused about this whole thing, so I apologize if my question doesn't make
              > sense. Does anyone have an explicit example they can share?
              >
              > Thanks,
              > Jay
              Transactional Integration of Foreign JMS Vendors with BEA WebLogic Server
              The following notes are derived mostly from "http://dev2dev.bea.com/technologies/jms/index.jsp".
              For additional questions, a good forum for WebLogic questions in general is "newsgroups.bea.com". These can be mined for information by using Google's newsgroup search function.
              Feature Overview
              - For a foreign JMS vendor to participate in a WL transaction it must support XA. Specifically, it must support the javax.jms.XA* interfaces.
              - In WL versions 6.0 and up it is possible to make synchronous calls to foreign JMS vendors participate in a WL transaction as long as the foreign vendor supports XA.
              - WL 6.0 and 6.1 MDBs can be driven by foreign vendors non-transactionally. They can be driven transactionally by a select few foreign vendors (MQ is not part of the select few)
              - WL 7.0 and later, MDBs can be driven by foreign vendors transactionally and non-transationally.
              - WL 6.1 and later WL provides a messaging bridge feature. Messaging bridges forward messages between any two JMS destinations, including foreign destinations, and can transfer messages transactionally or non-transactionally.
              - WL 8.1 JMS provides additional features that simplify transactional and JNDI integration of foreign vendors. See http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              Integration with 8.1 Details
              A good overview of 8.1 JMS interop capability is the presentation "Integrating Foreign JMS Providers with BEA WebLogic Server" here:
              http://www.bea.com/content/files/eworld/presentations/Wed_03_05_03/Application_Servers/1097-Foreign_JMS_Providers_WLS.pdf
              This document refers to helpful new 8.1 features, which simplify integration. These include:
              http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#accessing_foreign_providers
              http://edocs.bea.com/wls/docs81/jms/j2ee_components.html#1033768
              And are also summarized here (under interoperability):
              http://edocs.bea.com/wls/docs81/jms/intro.html#jms_features
              The 8.1 features are likely sufficient for most 8.1 integration needs, and you may not need to refer "Using Foreign JMS Providers With WLS" white-paper mentioned below.
              Integration with 6.1 and 7.0 Details
              Read the "Using Foreign JMS Providers With WLS" white-paper:
              http://dev2dev.bea.com/products/wlserver/whitepapers/jmsproviders.jsp
              Note that this white-paper does not take into account 8.1 features.
              MQ Remote Capable XA Clients
              Until recently, IBM MQ JMS clients could not work transactionally unless they were running on the same host as their MQ server. This is a limitation unique to MQ that was relaxed with the introduction of IBM's new "WebSphere MQ Extended Transactional Client". See:
              http://publibfp.boulder.ibm.com/epubs/pdf/csqzar00.pdf
              The product is new, and for some reason, configuration of this client seems to be tricky, even when WebLogic is not involved at all. Oddly, the main sticking point seems to be simply making sure that class paths refer to the required IBM jars:
              - Required on WLS where MQ objects are bound into JNDI:
              com.ibm.mq.jar, com.ibm.mqjms.jar
              - Required only if MQ objects are bound into JNDI on a different server:
              com.ibm.mq.jar
              If there are problems when using this client, first get it to work using a pure IBM client without any BEA classes involved. Once that is working, search the WL JMS newsgroup for answers and/or contact BEA customer support.
              MDB Thread Pool Notes
              WL7.0SP? and WL8.1 and later support the "dispatch-policy" field to specify which thread pool an MDB uses to run its instances. In most cases this field should be configured to help address potential performance issues and/or dead-locks:
              http://edocs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html#dispatch-policy
              (Note that "dispatch-policy" is ignored for non-transactional foreign vendors; in this case, the MDB "onMessage" callback runs in the foreign vendor's thread.)
              MDB Concurrency Notes
              Queue MDBs driven by foreign providers can run multiple instances concurrently. Topic MDBs driven by foreign providers are limited to one instance (not sure, but transactional foreign driven topic MDBs may not have this limitation). The size of the thread pool that the MDB runs in and the "max-beans-in-free-pool" descriptor limit how many instances run concurrently.
              Performance Tuning Notes
              The "WebLogic JMS Performance Guide" white-paper contains detailed performance design and tuning information for the Messaging Bridge, JMS, and MDBs.
              http://dev2dev.bea.com/products/wlserver/whitepapers/WL_JMS_Perform_GD.jsp
              

  • Configuring Destination Resource.

    Hi,
    I am working on SUNONE Server 8.0. I need to configuration details for the list below:
    1. By default my client is able to reestablish a connection when JMS is restarted. Is there any setting to be done on SUN server console to disable this feature.
    2. How do i make the SUN JMS to store the message when SUN App. server is shutdown & publish the same when started? Is there any setting to be done.
    It would be helpful if provided some inputs on this. Documents on the same would be fantastic.
    Thanks in Advance.

    Hi!
    1.- For the firs issue, the objet in charge of that behaviour is the QueueConnectionFactory, and depending how you connect to imq (ldap, jndi, directly), you need to set a property for that.
    In case of a direct connection it would be:
    com.sun.messaging.QueueConnectionFactory fq=new com.sun.messaging.QueueConnectionFactory();
    fq.setProperty("imqBrokerHostName", BrokerHost);
    fq.setProperty("imqBrokerHostPort", BrokerPortI);
    fq.setProperty("imqReconnect", "true");In case of a JNDI connection:
    - Open the object store using imqadmin, the queueConnectionFactory you are using, and set the property
    - In the imqadmin help each parameter have nice comments about how they work.
    As a final comment you can also setup the time interval for the client to retry the connection to the broker (also to try a different broker, balance broker).
    2.- That is automatic, don't worry, we have seen several issues with imq, but the shutdown-start sequence work fine (also in hard conditions, with heavy load, about 20 message/sec)
    hope that help!, by!

  • How to: Init JDNI for MS JDBC?

    hello all - have you guys ever used Microsoft's JDBC and successfully use its connection pooling?
    How do you guys do it?
    It says I need to intialize the JDNI environment to be able to use the functionality.
    Please help

    Hi jarod2,
    when you talk about MS JDBC you mean the JDBC driver for MS SQLServer?
    If so I have a bad news for you. I had problems with the SQLServerDataSource object, so I took a look at the mailing list and found that it was a common problem, and the reply was that there is a bug somewhere in the driver that make it always return a null pointer when you try to lookup a data source object from JNDI.
    Anyways in the documentation there is no explanation on how to initialize the JNDI environment for the connection pooling, but there is only a couple of examples on how to initialize a data source object in the Examples directory (one using the LDAP jndi service provider, and the other using the FILE SYSTEM one).
    My advice is to use some virtual driver such as Poolman to provide the connection pooling implementation.
    You can find Poolman at the following url:
    www.codestudio.com
    bye

  • LDAP or JNDI Synchronization Across JVMs?

    I need to perform an atomic operation (get & set) in
    LDAP that is synchronized between multiple
    applications (i.e. across JVMs).
    Is that possible using iDS 4.x or 5.x?
    Does iDS implementation of JNDI/LDAP API provide a
    global lock mechanism (I know that this feature is not
    supported in the API)?
    Here is my actual problem. I need to generate a unique
    id of type "long". This id should be unique across
    several Java applications. I would like to store this
    id in LDAP.
    Any help is appreciated.
    Thanks, Shahriar

    There is no such locking mechanism. Is there a reason the unique id has to be type long? If not, then how about using a UUID? If it needs to be long, perhaps apportioning the number space between applications would work for you.

  • Sample code to connect LDAP server using jndi

    Hi,
    can any one help me with sample code to connect LDAP server using jndi,
    like i want to make use of Ldap server for serching Active directoty.
    Thanks in advance,
    Regards
    Muthu

    You can set ldap_auth=none for anonymous user.
    User/password is mandatory otherwise. Please refer to http://docs.oracle.com/cd/E21764_01/integrate.1111/e12644/appendix_ldap_driver.htm#CHDHCABH
    Thansk,

Maybe you are looking for

  • OS 8.6 Won't Boot login, etc.

    I'm pretty well versed with OS X and Unix, but troubleshooting Mac OS 9 and below leaves me confused at times. I'm hoping someone knows what this means here. I've received a Grape iMac G3 (probably a Rev. C) that looks like it boots up fine, and the

  • How to take a backup manually in oracle 11g express edition?

    how to take a backup manually in oracle 11g express edition? i want to take backup of a database and want to restore later on on a different computer .

  • IPhoto 09 - lost all my pictures?

    Background: I noticed a few days ago that when I clicked on a thumbnail in iPhoto'09 it opened up to a big exclamation mark on a black background. I rebuilt the library by opening up iPhoto while holding down OPTION + COMMAND, and selected all of the

  • Purchase Requisitions in MRP

    Dear All, when we run MRP and convert some plan orders into P/Requisitions.PRs are not firm.some of PRs have not been converted to Prders. so when we run MRP again it did't take PRs into schedule receipts.so it generates plan orders even its PRs are

  • Bubble graph - set max bubble size?

    Hi How can I set a max/min size for bubbles in a bubble graph? As users filter data sets the bubbles grow so large that the graph is hard to read. I would hope the API allows me to set these and let the graph code figure out the relative sizes within