View | Details | Raw Unified | Return to bug 61313
Collapse All | Expand All

(-)a/java/org/apache/catalina/realm/JNDIRealm.java (-3 / +17 lines)
Lines 2345-2354 public class JNDIRealm extends RealmBase { Link Here
2345
     * @exception NamingException if a directory server error occurs
2345
     * @exception NamingException if a directory server error occurs
2346
     */
2346
     */
2347
    protected DirContext open() throws NamingException {
2347
    protected DirContext open() throws NamingException {
2348
        // pm: disable this just to see what happens... trying to make failover faster
2349
        //     so far I know that the createDirContext(...) it does at the tomcat initialization is very fast to choose a working server,
2350
        //     but other code is slow so returning a bad context now means it takes 15m32s to fail over
2351
        boolean uglyhack = true;
2352
        if (uglyhack) {
2353
            if (context != null)
2354
                try{
2355
                    context.close();
2356
                }catch(Throwable ignored){
2348
2357
2349
        // Do nothing if there is a directory server connection already open
2358
                }finally{
2350
        if (context != null)
2359
                    context = null;
2351
            return context;
2360
                }
2361
        }else{
2362
            // Do nothing if there is a directory server connection already open
2363
            if (context != null)
2364
                return context;
2365
        }
2352
2366
2353
        try {
2367
        try {
2354
2368

Return to bug 61313