Hello,
I am using Netscape Java tool kit 4.1 to establish a connection with a
netscape directory. Sometime when the directory is not available, the
tool kit tries to establish a connection any way and it takes about at
least 3 to 5 minutes before an LDAPException is thrown, basically it
hangs. I would like to setup a time-out session, that if it can't
connect within 15 sec, then give up.
I have tried using setConnectTimeout but it didn't help, I also tried
set Option but failed again.
Here is my connection code:
try {
ld = new LDAPConnection();
//System.out.print( + "\n");
/* Connect to server */
// ld.setOption(LDAPv2.TIMELIMIT, new Integer (50000));
ld.connect(ipaddress, dirport);
} catch (LDAPException le) {}
Any ideas...
Thanks
Ahmad Noori
SAIC
[EMAIL PROTECTED]