Author: markt
Date: Mon Jul 28 21:07:19 2014
New Revision: 1614180

URL: http://svn.apache.org/r1614180
Log:
Allow the JNDI Realm to start even if the directory is not available. The 
directory not being available is not fatal once the Realm is started and it 
need not be fatal when the Realm starts. Based on a patch by Cédric Couralet.
This closes #11 

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1614179

Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java?rev=1614180&r1=1614179&r2=1614180&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java 
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JNDIRealm.java Mon Jul 
28 21:07:19 2014
@@ -2184,11 +2184,15 @@ public class JNDIRealm extends RealmBase
     @Override
     protected void startInternal() throws LifecycleException {
 
-        // Validate that we can open our connection
+        // Check to see if the connection to the directory can be opened
         try {
             open();
         } catch (NamingException e) {
-            throw new LifecycleException(sm.getString("jndiRealm.open"), e);
+            // A failure here is not fatal as the directory may be unavailable
+            // now but available later. Unavailability of the directory is not
+            // fatal once the Realm has started so there is no reason for it to
+            // be fatal when the Realm starts.
+            containerLog.error(sm.getString("jndiRealm.open"), e);
         }
 
         super.startInternal();

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1614180&r1=1614179&r2=1614180&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Jul 28 21:07:19 2014
@@ -62,7 +62,13 @@
         When scanning class files (e.g. for annotations) and reading the number
         of parameters in a <code>MethodParameters</code> structure only read a
         single byte (rather than two bytes) as per the JVM specification. Patch
-        provided by labes. (markt)
+        provided by Francesco Komauli. (markt)
+      </fix>
+      <fix>
+        Allow the JNDI Realm to start even if the directory is not available.
+        The directory not being available is not fatal once the Realm is 
started
+        and it need not be fatal when the Realm starts. Based on a patch by
+        Cédric Couralet. (markt)
       </fix>
     </changelog>
   </subsection>



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

Reply via email to