directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendy Irawan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-96) Connection leak in LdapConnectionPool.
Date Thu, 29 Nov 2012 09:18:58 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13506350#comment-13506350
] 

Hendy Irawan commented on DIRAPI-96:
------------------------------------

Since it wasn't fixed in M13, this bug should be marked as:

Affects Version: M13
Fix Version: M14
                
> Connection leak in LdapConnectionPool.
> --------------------------------------
>
>                 Key: DIRAPI-96
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-96
>             Project: Directory Client API
>          Issue Type: Bug
>            Reporter: Damien Dubé
>             Fix For: 1.0.0-M13
>
>
> 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 and
it does the trick.
>     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;
>     }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message