Mny thanks for the report! Would you be willing to create a JIRA with
your fix ? That would make it easier for us to track the fixed issues in
teh next version !
Le 11/15/12 9:57 PM, Damien Dubé a écrit :
> 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]
>
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com