You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by fh...@apache.org on 2007/09/27 16:42:50 UTC

svn commit: r580031 - /tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java

Author: fhanik
Date: Thu Sep 27 07:42:47 2007
New Revision: 580031

URL: http://svn.apache.org/viewvc?rev=580031&view=rev
Log:
forward port of bz 33774 from 6.0

Modified:
    tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java

Modified: tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java
URL: http://svn.apache.org/viewvc/tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java?rev=580031&r1=580030&r2=580031&view=diff
==============================================================================
--- tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java (original)
+++ tomcat/sandbox/gdev6x/java/org/apache/catalina/realm/JNDIRealm.java Thu Sep 27 07:42:47 2007
@@ -1534,6 +1534,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