1

Please post if there is any example/steps to configuring external LDAP and execute LDAP queries on it.

I tried the following

  • creating Foreign JNDI Providers
  • Created remote and local JNDI names
  • from servlet client, I tried lookup using foreign jndi name, local and remote jndi names

Finally lookup with local name succeeded, unfortunately that tried to connect localhost:389. Not sure what went wrong.

Please help with any example.

JoseK
  • 31,141
  • 14
  • 104
  • 131
Nageswara Rao
  • 954
  • 1
  • 10
  • 32

2 Answers2

2
  1. Create a Foreign JNDI Provider.
  2. Initial context factory: com.sun.jndi.ldap.LdapCtxFactory (i was using openDS LDAP)
  3. Provider URL : "ldap://localhost:389"
  4. User as: cn=Directory Manager
  5. Password: give LDAP password.
  6. Properties:

    com.sun.jndi.ldap.connect.pool=true
    com.sun.jndi.ldap.connect.pool.maxsize=16
    com.sun.jndi.ldap.connect.pool.prefsize=10
    com.sun.jndi.ldap.connect.pool.timeout=600000
    java.naming.referral=follow
    java.naming.security.authentication=simple
    
  7. Create a Foreign JNDI link

    linkname : testLink
    localJndi : testLocalJNDI
    Remote JNDI :  dc=test,dc=org (LDAP BASE DN)
    

Now you can access the LDAP from your code using the "testLocalJNDI".

Cheers, Karai

Martin Wickman
  • 19,662
  • 12
  • 82
  • 106
karaiyandi
  • 36
  • 2
0

As I experienced, it is not possible to link a whole ldap tree under weblogic jndi. Foregin jndi link supports only side-by-side jndi object linkage.

I cannot understand the previous answer why gives a solution to this thread.

naan
  • 39
  • 4