tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup EmbeddedManager.java
Date Wed, 26 Sep 2001 18:55:40 GMT
remm        01/09/26 11:55:40

  Modified:    catalina/src/share/org/apache/catalina/startup
                        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
  1.4       +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.4
  diff -u -r1.3 -r1.4
  --- EmbeddedManager.java	2001/07/22 20:25:13	1.3
  +++ EmbeddedManager.java	2001/09/26 18:55:40	1.4
  @@ -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.4 2001/09/26 18:55:40 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/09/26 18:55:40 $
    *
    * ====================================================================
    *
  @@ -87,7 +87,7 @@
    * Implementation of the Catalina JMX MBean as a wrapper of the Catalina class.
    *
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   
   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);
   
       }
   
  
  
  

Mime
View raw message