directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: bug in LdapConnectionPool.
Date Thu, 15 Nov 2012 21:22:07 GMT
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é
> damien.dube@gmail.com
>


-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message