remm        01/09/26 11:56:29

  Modified:    catalina/src/share/org/apache/catalina/startup Tag:
                        tomcat_40_branch EmbeddedManager.java
  Log:
  - If embedded.start() fails, the state would be incorrect.
    Thanks to Toby Cabot (toby at caboteria.org) for the patch.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.3.2.1   +11 -11    
jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/EmbeddedManager.java
  
  Index: EmbeddedManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/EmbeddedManager.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- EmbeddedManager.java      2001/07/22 20:25:13     1.3
  +++ EmbeddedManager.java      2001/09/26 18:56:29     1.3.2.1
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/EmbeddedManager.java,v
 1.3 2001/07/22 20:25:13 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:13 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/EmbeddedManager.java,v
 1.3.2.1 2001/09/26 18:56:29 remm Exp $
  + * $Revision: 1.3.2.1 $
  + * $Date: 2001/09/26 18:56:29 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * Implementation of the Catalina JMX MBean as a wrapper of the Catalina class.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Remy Maucherat</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.3.2.1 $
    */
   
   public final class EmbeddedManager
  @@ -192,6 +192,13 @@
   
               embedded.start();
   
  +            state = STARTED;
  +            notification = new AttributeChangeNotification
  +                (this, sequenceNumber++, System.currentTimeMillis(),
  +                 "Started " + NAME, "State", "java.lang.Integer",
  +                 new Integer(STARTING), new Integer(STARTED));
  +            sendNotification(notification);
  +
           } catch (Throwable t) {
               state = STOPPED;
               notification = new AttributeChangeNotification
  @@ -200,13 +207,6 @@
                    new Integer(STARTING), new Integer(STOPPED));
               sendNotification(notification);
           }
  -
  -        state = STARTED;
  -        notification = new AttributeChangeNotification
  -            (this, sequenceNumber++, System.currentTimeMillis(),
  -             "Started " + NAME, "State", "java.lang.Integer",
  -             new Integer(STARTING), new Integer(STARTED));
  -        sendNotification(notification);
   
       }
   
  
  
  

Reply via email to