ASF Bugzilla – Attachment 35148 Details for
Bug 61313
JNDIRealm LDAP server failover to alternateURL takes very long 15m32s
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add an option to set a read timeout to ldap connections used by JNDI Realm
0001-Add-a-read-timeout-to-LDAP-connections-used-by-the-J.patch (text/plain), 1.90 KB, created by
Felix Schumacher
on 2017-07-17 17:17:28 UTC
(
hide
)
Description:
Add an option to set a read timeout to ldap connections used by JNDI Realm
Filename:
MIME Type:
Creator:
Felix Schumacher
Created:
2017-07-17 17:17:28 UTC
Size:
1.90 KB
patch
obsolete
>From fc3d54e683f1801b41843589a5b0463f71225094 Mon Sep 17 00:00:00 2001 >From: Felix Schumacher <felix.schumacher@internetallee.de> >Date: Mon, 17 Jul 2017 19:12:21 +0200 >Subject: [PATCH] Add a read timeout to LDAP connections used by the JNDI > Realm. > >--- > java/org/apache/catalina/realm/JNDIRealm.java | 29 +++++++++++++++++++++++++++ > 1 file changed, 29 insertions(+) > >diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java >index cc8993c..223cb57 100644 >--- a/java/org/apache/catalina/realm/JNDIRealm.java >+++ b/java/org/apache/catalina/realm/JNDIRealm.java >@@ -417,6 +417,12 @@ public class JNDIRealm extends RealmBase { > protected String connectionTimeout = "5000"; > > /** >+ * The timeout, in milliseconds, to use when trying to read from a connection >+ * to the directory. The default is 5000 (5 seconds). >+ */ >+ protected String readTimeout = "5000"; >+ >+ /** > * The sizeLimit (also known as the countLimit) to use when the realm is > * configured with {@link #userSearch}. Zero for no limit. > */ >@@ -1037,6 +1043,27 @@ public class JNDIRealm extends RealmBase { > > } > >+ /** >+ * @return the read timeout. >+ */ >+ public String getReadTimeout() { >+ >+ return readTimeout; >+ >+ } >+ >+ >+ /** >+ * Set the read timeout. >+ * >+ * @param timeout The new read timeout >+ */ >+ public void setReadTimeout(String timeout) { >+ >+ this.readTimeout = timeout; >+ >+ } >+ > > public long getSizeLimit() { > return sizeLimit; >@@ -2511,6 +2538,8 @@ public class JNDIRealm extends RealmBase { > env.put(JNDIRealm.DEREF_ALIASES, derefAliases); > if (connectionTimeout != null) > env.put("com.sun.jndi.ldap.connect.timeout", connectionTimeout); >+ if (readTimeout != null) >+ env.put("com.sun.jndi.ldap.read.timeout", readTimeout); > > return env; > >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 61313
:
35146
|
35147
| 35148 |
35151