From 9888e050aa609991e00fcde47029be749706aba6 Mon Sep 17 00:00:00 2001 From: markt Date: Wed, 5 Sep 2007 02:14:45 +0000 Subject: [PATCH] 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 --- java/org/apache/catalina/realm/JNDIRealm.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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); + } -- 2.11.0