I found a bug in LdapConnectionPool.
If a Connection fails on credentials, the LdapConnection is not closed and
is not in the pool.
I modified the makeObject() function
in PoolableLdapConnectionFactory.java to this
public Object makeObject() throws Exception
{
LOG.debug("creating a LDAP connection");
LdapNetworkConnection connection = new
LdapNetworkConnection(config);
try {
connection.bind(config.getName(), config.getCredentials());
} catch (Exception e1) {
try {
connection.close();
} catch (Exception e2) {
}
throw e1;
}
return connection;
}
It seems to be doing the trick!
Damien Dubé
[email protected]