[Date Prev][Date Next]
RE: use of JLDAP's LDAPConnection
Thank you everyone for the replies!
Jon, I completely missed those methods. They solve the problem on Windows
2000. Interestingly, I notice that com.novell.ldap.LDAPConnection has those
methods but also has one called isConnectionAlive(). Looking at the source
code, isConnectionAlive() actually attempts to write data to the socket. If
an exception is thrown, the method returns false; otherwise true.
isConnected(), on the other hand, only checks to see if the input stream is
null. Without a thorough analysis of the class, it'd be hard for me to
determine when the stream is set to null, but on Windows 2000 this seems to
be equivalent to isConnectionAlive(). I'm wondering if other operating
systems are able to proactively determine socket disconnects without
attempting to write/read data to/from the socket and, moreover, why novell
thought they needed to include this extra method in their version of the
Any thoughts? I'd rather not use the novell-specific classes...
From: Jon Roberts [mailto:email@example.com]
Sent: Thursday, June 09, 2005 5:57 PM
To: Jung, Eric
Subject: Re: use of JLDAP's LDAPConnection
Jung, Eric wrote:
> Is there any way to determine if an LDAPConnection (or its underlying
> socket) has gone bad?
Have you tried testing the connection with the LDAPConnection
isConnected() and isBound() methods?