tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r572860 - /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
Date Wed, 05 Sep 2007 02:15:36 GMT
Author: markt
Date: Tue Sep  4 19:15:35 2007
New Revision: 572860

URL: http://svn.apache.org/viewvc?rev=572860&view=rev
Log:
Port improved fix for 33774 that adds a check for the alternative exception to the remaining
point where it could be seen.

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java?rev=572860&r1=572859&r2=572860&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/realm/JNDIRealm.java Tue
Sep  4 19:15:35 2007
@@ -1533,6 +1533,21 @@
                 // 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);
+
             }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message