RFR [14] 8217606: LdapContext#reconnect always opens a new connection

Lance Andersen lance.andersen at oracle.com
Wed Aug 7 13:30:30 UTC 2019

Hi Pavel,

The change looks good.  Nice job on the tests :-)

> On Aug 7, 2019, at 8:47 AM, Pavel Rappo <pavel.rappo at oracle.com> wrote:
> Hello,
> Please review the following change:
>   http://cr.openjdk.java.net/~prappo/8217606/webrev.00/
> The original issue seems to be an unintended consequence of JDK-8059009 [1].
> The proposed change is based on the private patch by Chris Yin. I skimmed
> through the history of the `com.sun.jndi.ldap.Connection.useable` flag which
> dates back to JDK-4532408 [2]
>    - Maintains a flag, 'useable', to indicate whether underlying network
>    connection is useable. A connection starts out useable and becomes
>    unuseable when an IO error is encountered while reading from/writing
>    to it.
> and I believe that this field is a good fit for what Chris has proposed.
> Not only does the proposed change fix the issue, it also introduces a reusable
> test component for mocking/stubbing/faking an LDAP server. Chris and myself took
> some time in our private correspondence to shape that component such that it
> would allow to refactor some of the existing LDAP tests, should we decide to 
> do so.
> As far as mach5 is concerned, the change looks good.
> Thanks,
> -Pavel
> -------------------------------------------------------------------------------
> [1] https://bugs.openjdk.java.net/browse/JDK-8059009
> [2] https://bugs.openjdk.java.net/browse/JDK-4532408

 <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>
 <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen at oracle.com <mailto:Lance.Andersen at oracle.com>

More information about the core-libs-dev mailing list