Author: markt
Date: Fri Aug 5 16:31:41 2011
New Revision: 1154298
URL: http://svn.apache.org/viewvc?rev=1154298&view=rev
Log:
Prevent spurious log warnings on container stop if a child component has
previously failed.
Modified:
tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java?rev=1154298&r1=1154297&r2=1154298&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/ContainerBase.java Fri Aug 5
16:31:41 2011
@@ -1062,7 +1062,8 @@ public abstract class ContainerBase exte
setState(LifecycleState.STOPPING);
// Stop the Valves in our pipeline (including the basic), if any
- if (pipeline instanceof Lifecycle) {
+ if (pipeline instanceof Lifecycle &&
+ ((Lifecycle) pipeline).getState().isAvailable()) {
((Lifecycle) pipeline).stop();
}
@@ -1082,7 +1083,8 @@ public abstract class ContainerBase exte
if ((cluster != null) && (cluster instanceof Lifecycle)) {
((Lifecycle) cluster).stop();
}
- if ((manager != null) && (manager instanceof Lifecycle)) {
+ if ((manager != null) && (manager instanceof Lifecycle) &&
+ ((Lifecycle) manager).getState().isAvailable() ) {
((Lifecycle) manager).stop();
}
if ((logger != null) && (logger instanceof Lifecycle)) {
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1154298&r1=1154297&r2=1154298&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Fri Aug 5
16:31:41 2011
@@ -5459,7 +5459,8 @@ public class StandardContext extends Con
// Stop ContainerBackgroundProcessor thread
threadStop();
- if (manager != null && manager instanceof Lifecycle) {
+ if (manager != null && manager instanceof Lifecycle &&
+ ((Lifecycle)
manager).getState().isAvailable()) {
try {
((Lifecycle) manager).stop();
} catch (LifecycleException e) {
@@ -5507,7 +5508,8 @@ public class StandardContext extends Con
fireLifecycleEvent(Lifecycle.CONFIGURE_STOP_EVENT, null);
// Stop the Valves in our pipeline (including the basic), if any
- if (pipeline instanceof Lifecycle) {
+ if (pipeline instanceof Lifecycle &&
+ ((Lifecycle) pipeline).getState().isAvailable()) {
((Lifecycle) pipeline).stop();
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1154298&r1=1154297&r2=1154298&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Aug 5 16:31:41 2011
@@ -138,6 +138,10 @@
<bug>51614</bug>: Avoid calling store.load() and session.expire()
twice in PersistentManager when expiring sessions. (kfujino)
</fix>
+ <fix>
+ Prevent spurious log warnings on container stop if a child component
has
+ previously failed. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]