protected String commonRole = null;
+ /**
+ * The timeout, in milliseconds, to use when trying to create a connection
+ * to the directory. The default is 5000 (5 seconds).
+ */
+ protected String connectionTimeout = "5000";
+
// ------------------------------------------------------------- Properties
/**
}
+ /**
+ * Return the connection timeout.
+ */
+ public String getConnectionTimeout() {
+
+ return connectionTimeout;
+
+ }
+
+
+ /**
+ * Set the connection timeout.
+ *
+ * @param timeout The new connection timeout
+ */
+ public void setConnectionTimeout(String timeout) {
+
+ this.connectionTimeout = timeout;
+
+ }
+
+
+ /**
+ * Return descriptive information about this Realm implementation and
+ * the corresponding version number, in the format
+ * <code><description>/<version></code>.
+ */
+ @Override
+ public String getInfo() {
+
+ return info;
+
+ }
+
+
// ---------------------------------------------------------- Realm Methods
env.put(Context.REFERRAL, referrals);
if (derefAliases != null)
env.put(JNDIRealm.DEREF_ALIASES, derefAliases);
+ if (connectionTimeout != null)
+ env.put("com.sun.jndi.ldap.connect.timeout", connectionTimeout);
return env;
property.</p>
</attribute>
+ <attribute name="connectionTimeout" required="false">
+ <p>The timeout in milliseconds to use when establishing the connection
+ to the LDAP directory. If not specified, a value of 5000 (5 seconds) is
+ used.</p>
+ </attribute>
+
<attribute name="connectionURL" required="true">
<p>The connection URL to be passed to the JNDI driver when
establishing a connection to the directory.</p>