dcsimg
Ldap Connection Pool hang issue
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   krupa_natarajan
Posted On:   Friday, July 9, 2004 12:15 PM

Hi all, We are facing a problem with the Ldap Connection Pooling (using J2SDK 1.4.2_03). We are noticing that even after the context is being closed, it is being flagged as busy and is not garbage collected immediately. After a while, all connections in the pool are busy and the new InitialDirContext() call hangs or times out. We are using object factories and are also closing the context within the getObjectInstance() method. The code extract is as follows : User user = null; DirContext ctx = (DirContext)LdapContextPool.getInstance().getContext(); try { user = (User)ctx.lookup((new UserDn(uid)).getDn()); } catch (Exception ex) { ex.printStackTrace   More>>

Hi all,
We are facing a problem with the Ldap Connection Pooling (using J2SDK 1.4.2_03). We are noticing that even after the context is being closed, it is being flagged as busy and is not garbage collected immediately.
After a while, all connections in the pool are busy and the new InitialDirContext() call hangs or times out.

We are using object factories and are also closing the context within the getObjectInstance() method.

The code extract is as follows :

User user = null;
DirContext ctx = (DirContext)LdapContextPool.getInstance().getContext();
try
{
user = (User)ctx.lookup((new UserDn(uid)).getDn());
}
catch (Exception ex)
{
ex.printStackTrace();
}
finally
{
LdapContextPool.getInstance().releaseContext(ctx);
ctx = null;
}
return user;

Any help on this would be greatly appretiated.
Thanks,
K

   <<Less
About | Sitemap | Contact