Hi,

I have been searching this problem for a while, but I cannot find
anything.

I have a list of Ldap servers to connect to, and some of them are down.
I set the timeout of the LDAPConnection with this code:

Code:
--------------------
LDAPConnection lc = new LDAPConnection(connTimeout);
LDAPConstraints lcons = new LDAPConstraints();

lcons.setTimeLimit(connTimeout);
lc.getSearchConstraints().setTimeLimit(connTimeout );
lc.getSearchConstraints().setServerTimeLimit(connT imeout);
lc.setConstraints(lcons);
--------------------


The problem is that timeout does not work within this invocation:

Code:
--------------------
lc.connect(this.ip, this.port);
--------------------

After 21000 ms (I made several measures and all are around 21000 +/- 50
ms) this method throws an LDAPException saying that the connection is
timed out, although I was using 5000 ms for timeout. So, it throws the
right exception, but in an incorrect time.

Please help!
Thanks in advance for your time.

Regards,
Juan Ignacio


--
jigarzon
------------------------------------------------------------------------
jigarzon's Profile: http://forums.novell.com/member.php?userid=95031
View this thread: http://forums.novell.com/showthread.php?t=421745