directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lucas theisen (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DIRAPI-199) LdapConnectionPool.getUnboundConnection is an oxymoron
Date Fri, 25 Jul 2014 19:36:38 GMT
lucas theisen created DIRAPI-199:
------------------------------------

             Summary: LdapConnectionPool.getUnboundConnection is an oxymoron
                 Key: DIRAPI-199
                 URL: https://issues.apache.org/jira/browse/DIRAPI-199
             Project: Directory Client API
          Issue Type: Bug
            Reporter: lucas theisen
            Priority: Critical


The unBind() operation, will close the session, thereby disconnecting, so you are effectively
handing out an unconnected connection.  This makes no sense.  The best thing to do in this
case is most likely to just hand out an already bound connection because that is the only
guarantee we can make with a pool other than creating a new connection each time.  When a
connection is returned to the pool, we can just re bind() it so as to make sure that any changes
made to the connection are reverted back to an initial state.

Furthermore, an unBind() followed shortly thereafter by a bind() will eventually cause a race
condition as described [here|http://mail-archives.apache.org/mod_mbox/directory-dev/201407.mbox/%3CEE6ADC61AF2D71408E4FA7F9517DB7710A9C07E5%40IMCMBX03.MITRE.ORG%3E]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message