From: markt Date: Wed, 5 Sep 2007 02:14:45 +0000 (+0000) Subject: Improve fix for 33774 by adding check for alternative exception to the remaining... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9888e050aa609991e00fcde47029be749706aba6;p=tomcat7.0 Improve fix for 33774 by adding check for alternative exception to the remaining point where it could be seen. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@572859 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/catalina/realm/JNDIRealm.java b/java/org/apache/catalina/realm/JNDIRealm.java index a46527733..114b01339 100644 --- a/java/org/apache/catalina/realm/JNDIRealm.java +++ b/java/org/apache/catalina/realm/JNDIRealm.java @@ -1549,6 +1549,21 @@ public class JNDIRealm extends RealmBase { // Try the authentication again. principal = getPrincipal(context, username); + } catch (ServiceUnavailableException e) { + + // log the exception so we know it's there. + containerLog.warn(sm.getString("jndiRealm.exception"), e); + + // close the connection so we know it will be reopened. + if (context != null) + close(context); + + // open a new directory context. + context = open(); + + // Try the authentication again. + principal = getPrincipal(context, username); + }