summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/c2kernel/lookup/LDAPLookup.java4
-rw-r--r--src/main/java/com/c2kernel/lookup/LDAPProperties.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/com/c2kernel/lookup/LDAPLookup.java b/src/main/java/com/c2kernel/lookup/LDAPLookup.java
index 85edc76..28abb24 100644
--- a/src/main/java/com/c2kernel/lookup/LDAPLookup.java
+++ b/src/main/java/com/c2kernel/lookup/LDAPLookup.java
@@ -92,7 +92,9 @@ public class LDAPLookup
* @throws LDAPException when the connection was unsuccessful
*/
public static LDAPConnection createConnection(LDAPProperties lp) throws LDAPException {
- LDAPConnection ld = new LDAPConnection();
+ LDAPConnection ld;
+ if (lp.mTimeOut == 0) ld = new LDAPConnection();
+ else ld = new LDAPConnection(lp.mTimeOut);
Logger.msg(3, "LDAPLookup - connecting to " + lp.mHost);
ld.connect(lp.mHost, Integer.valueOf(lp.mPort).intValue());
diff --git a/src/main/java/com/c2kernel/lookup/LDAPProperties.java b/src/main/java/com/c2kernel/lookup/LDAPProperties.java
index a9ae699..19141f5 100644
--- a/src/main/java/com/c2kernel/lookup/LDAPProperties.java
+++ b/src/main/java/com/c2kernel/lookup/LDAPProperties.java
@@ -24,6 +24,7 @@ public class LDAPProperties
public String mPassword = null;
public static String mGeneratedPassword = null;
public String mDbPath = null;
+ public int mTimeOut = 0;
public LDAPProperties()
{
@@ -35,6 +36,7 @@ public class LDAPProperties
mUser = Gateway.getProperty( "LDAP.user" );
mPassword = Gateway.getProperty( "LDAP.password" );
mDbPath = Gateway.getProperty( "LDAP.dbPath" );
+ mTimeOut = Integer.valueOf(Gateway.getProperty( "LDAP.timeOut", "0"));
mRootPath += "," + mGlobalPath;
mLocalPath += "," + mRootPath;