We are building an application to facilitate seaches of our LDAP White pages 
catalog (through jndi). The structure we use is with a DAO and stateless 
session beans. 
The DAO creates a connection to the LDAP server with "new 
InitialDirContext(...)" and then a normal search operation is done. Many times 
we use multi-level searches and this generates lots and lots of 
InitialDirContexts and connections. The result is that our LDAP-server 
(iPlanet) is overwhelmed.

Now, the normal way to use jndi is to create new contexts from the initial one 
with the lookup()-method. However, the stateless session bean makes this 
impossible because we can't keep a reference to the initial dir context. 

What I would like to know is, what method should we use to keep this reference?
The context mustn't be shared between sessions, and preferrably the connection 
shouldn't be kept open for too long either. My idea is that we could keep this 
reference during a page load (HTTP request) and then throw it away.

Any suggestions?


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3856400#3856400

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3856400


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to