Uploaded image for project: 'Directory Client API'
  1. Directory Client API
  2. DIRAPI-96

Connection leak in LdapConnectionPool.

Watch issueLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0.0-M13
    • None

    Description

      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;
      }

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            elecharny Emmanuel Lécharny
            damien.dube Damien Dubé
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment