Commit 9a0011e0 authored by speedy01's avatar speedy01 Committed by akrherz

OF-887 ldap.readTimeout not used when LDAP getContext() is called for queries

Added readtimeout and connect time out to getcontext
parent 1c992ebd
...@@ -544,7 +544,15 @@ public class LdapManager { ...@@ -544,7 +544,15 @@ public class LdapManager {
} else { } else {
env.put("com.sun.jndi.ldap.connect.pool", "false"); env.put("com.sun.jndi.ldap.connect.pool", "false");
} }
if (connTimeout > 0) {
env.put("com.sun.jndi.ldap.connect.timeout", String.valueOf(connTimeout));
} else {
env.put("com.sun.jndi.ldap.connect.timeout", "10000");
}
if (readTimeout > 0) {
env.put("com.sun.jndi.ldap.read.timeout", String.valueOf(readTimeout));
}
if (followReferrals) { if (followReferrals) {
env.put(Context.REFERRAL, "follow"); env.put(Context.REFERRAL, "follow");
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment