ASF Bugzilla – Attachment 35146 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]
my hacky patch
tomcat85-jndi-peter.patch (text/plain), 1.36 KB, created by
Peter
on 2017-07-17 15:42:52 UTC
(
hide
)
Description:
my hacky patch
Filename:
MIME Type:
Creator:
Peter
Created:
2017-07-17 15:42:52 UTC
Size:
1.36 KB
patch
obsolete
>diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java >index 572409fca2..9592922ea7 100644 >--- a/java/org/apache/catalina/realm/JNDIRealm.java >+++ b/java/org/apache/catalina/realm/JNDIRealm.java >@@ -2345,10 +2345,24 @@ public class JNDIRealm extends RealmBase { > * @exception NamingException if a directory server error occurs > */ > protected DirContext open() throws NamingException { >+ // pm: disable this just to see what happens... trying to make failover faster >+ // so far I know that the createDirContext(...) it does at the tomcat initialization is very fast to choose a working server, >+ // but other code is slow so returning a bad context now means it takes 15m32s to fail over >+ boolean uglyhack = true; >+ if (uglyhack) { >+ if (context != null) >+ try{ >+ context.close(); >+ }catch(Throwable ignored){ > >- // Do nothing if there is a directory server connection already open >- if (context != null) >- return context; >+ }finally{ >+ context = null; >+ } >+ }else{ >+ // Do nothing if there is a directory server connection already open >+ if (context != null) >+ return context; >+ } > > try { >
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