tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r952000 - /tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java
Date Sun, 06 Jun 2010 21:50:11 GMT
Author: markt
Date: Sun Jun  6 21:50:11 2010
New Revision: 952000

URL: http://svn.apache.org/viewvc?rev=952000&view=rev
Log:
Make syncs consistent

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

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=952000&r1=951999&r2=952000&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java (original)
+++ tomcat/trunk/java/org/apache/catalina/util/LifecycleBase.java Sun Jun  6 21:50:11 2010
@@ -134,7 +134,12 @@ public abstract class LifecycleBase impl
 
         setState(LifecycleState.STARTING_PREP);
 
-        startInternal();
+        try {
+            startInternal();
+        } catch (LifecycleException e) {
+            setState(LifecycleState.FAILED);
+            throw e;
+        }
 
         if (state.equals(LifecycleState.FAILED) ||
                 state.equals(LifecycleState.MUST_STOP)) {
@@ -296,7 +301,7 @@ public abstract class LifecycleBase impl
      * @param state The new state for this component
      * @param data  The data to pass to the associated {@link Lifecycle} event
      */
-    protected void setState(LifecycleState state, Object data) {
+    protected synchronized void setState(LifecycleState state, Object data) {
         
         if (log.isDebugEnabled()) {
             log.debug(sm.getString("lifecycleBase.setState", this, state));



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


Mime
View raw message