tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1408165 - in /tomcat/trunk/java/org/apache/catalina: startup/FailedContext.java util/LifecycleBase.java
Date Mon, 12 Nov 2012 01:19:18 GMT
Author: markt
Date: Mon Nov 12 01:19:18 2012
New Revision: 1408165

URL: http://svn.apache.org/viewvc?rev=1408165&view=rev
Log:
If a component is FAILED it will remain in the FAILED state while stop() is called
Better logging for Lifecycle issues for FailedContext

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java
    tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java?rev=1408165&r1=1408164&r2=1408165&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/FailedContext.java Mon Nov 12 01:19:18 2012
@@ -222,6 +222,10 @@ public class FailedContext extends Lifec
     @Override
     public void removeChild(Container child) { /* NO-OP */ }
 
+    @Override
+    public String toString() {
+        return getName();
+    }
 
     // -------------------------------------------- All NO-OPs beyond this point
     @Override

Modified: tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java?rev=1408165&r1=1408164&r2=1408165&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java Mon Nov 12 01:19:18 2012
@@ -242,7 +242,7 @@ public abstract class LifecycleBase impl
             setStateInternal(LifecycleState.STOPPED, null, false);
 
             destroy();
-        } else {
+        } else if (!state.equals(LifecycleState.FAILED)){
             // Shouldn't be necessary but acts as a check that sub-classes are
             // doing what they are supposed to.
             if (!state.equals(LifecycleState.STOPPING)) {
@@ -272,7 +272,8 @@ public abstract class LifecycleBase impl
                 stop();
             } catch (LifecycleException e) {
                 // Just log. Still want to destroy.
-                log.warn(sm.getString("lifecycleBase.destroyStopFail"), e);
+                log.warn(sm.getString(
+                        "lifecycleBase.destroyStopFail", toString()), e);
             }
         }
 



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


Mime
View raw message