[Date Prev][Date Next]
RE: use of JLDAP's LDAPConnection
Well, I don't know the history of the library. Perhaps I shouldn't have said
There are two LDAPConnection classes: org.ietf.ldap.LDAPConnection and
com.novell.ldap.LDAPConnection. Indeed, the jar has most classes duplicated
in such a manner, and the documentation says the com.novell.* package offers
Novell-specific functionality/extensions. Since my LDAP server is neither
Novell nor OpenLDAP (IBM Tivoli, in fact), I decided to stick with the
standards-based org.ietf.* package. The LDAPConnection class in that package
does not have this "isConnectionAlive()" method of which I talk about
below... it actually seems like isConnectionAlive() has a better
implementation of checking for "aliveness" than isConnected().
Am I making sense?
From: Marc Boorshtein [mailto:email@example.com]
Sent: Friday, June 10, 2005 12:03 PM
To: Jung, Eric; 'firstname.lastname@example.org'
Subject: RE: use of JLDAP's LDAPConnection
I'm not really sure what you mean by "Novell specific
classes". While the entire package is branded by
novell, it is 100% LDAP.
--- "Jung, Eric" <Eric.Jung@Arbella.com> wrote:
> 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
> -----Original Message-----
> From: Jon Roberts [mailto:email@example.com]
> Sent: Thursday, June 09, 2005 5:57 PM
> To: Jung, Eric
> Cc: 'OpenLDAP-software@OpenLDAP.org'
> 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
> isConnected() and isBound() methods?
> Jon Roberts