You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2012/11/16 00:55:12 UTC
[jira] [Resolved] (DIRAPI-96) Connection leak in
LdapConnectionPool.
[ https://issues.apache.org/jira/browse/DIRAPI-96?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny resolved DIRAPI-96.
-------------------------------------
Resolution: Fixed
Fixed with : http://svn.apache.org/viewvc?rev=1410114&view=rev
Many thanks for the report and the patch !
> 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