[GRP-400] Connection Pooling with JNDISourceAdapter Created: 10/Aug/07  Updated: 25/Feb/11

Status: Open
Project: Grouper
Component/s: subject API
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Shilen Patel Assignee: Shilen Patel
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


The JNDISourceAdapter does not support connection pooling and does not cache connections, so each time information needs to be retrieved about a subject, a new LDAP connection is made.

Connection pooling can be added by simply setting com.sun.jndi.ldap.connect.pool to "true" in the environment properties.

environment.put("com.sun.jndi.ldap.connect.pool", "true");

It is not clear yet whether the value for this property should be a part of the sources.xml file.

Also, to support SSL and non-SSL connections, the system property com.sun.jndi.ldap.connect.pool.protocol should be set to "plain ssl".

Comment by Blair Christensen [ 15/Aug/07 ]

Pinged Kathryn to see if she wants to handle this issue.

Comment by Blair Christensen [ 15/Aug/07 ]

Changed component to "Subject API"

Comment by Joy Veronneau [ 09/Feb/09 ]

It looks like even if I add the line that Mike suggests, the connections are not being pooled.

In subject->JNDISourceAdapter->getLdapResults, we are doing

context = new InitialDirContext(environment);

for every search.

Comment by Jim Fox [ 25/Feb/11 ]

An alternative ldap source adapter from the University of Washington, http://staff.washington.edu/fox/grouper/, supports connection pooling.

Generated at Sun Feb 17 00:43:33 UTC 2019 using Jira 7.13.0#713000-sha1:fbf406879436de2f3fb1cfa09c7fa556fb79615a.