[jboss-cvs] jboss-tomcat/src/main/org/jboss/web/tomcat/tc5 ...

Galder Zamarreno galder.zamarreno at jboss.com
Fri Jul 21 07:34:11 EDT 2006


  User: gzamarreno
  Date: 06/07/21 07:34:11

  Modified:    src/main/org/jboss/web/tomcat/tc5   Tag:
                        JBoss_4_0_1_JBAS-3404 Tomcat5.java
                        Tomcat5MBean.java
  Log:
  [JBAS-3404] JBAS-1741 Patch for 4.0.1
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.24.2.2.18.1 +27 -5     jboss-tomcat/src/main/org/jboss/web/tomcat/tc5/Tomcat5.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Tomcat5.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-tomcat/src/main/org/jboss/web/tomcat/tc5/Tomcat5.java,v
  retrieving revision 1.24.2.2
  retrieving revision 1.24.2.2.18.1
  diff -u -b -r1.24.2.2 -r1.24.2.2.18.1
  --- Tomcat5.java	21 Oct 2004 06:57:47 -0000	1.24.2.2
  +++ Tomcat5.java	21 Jul 2006 11:34:11 -0000	1.24.2.2.18.1
  @@ -39,8 +39,9 @@
    *
    * @author Scott.Stark at jboss.org
    * @author Costin Manolache
  - * @author wonne.keysers at realsoftware.be
  - * @version $Revision: 1.24.2.2 $
  + * @author Wonne.Keysers at realsoftware.be 
  + * @author Dimitris.Andreadis at jboss.org  
  + * @version $Revision: 1.24.2.2.18.1 $
    * @see org.jboss.web.AbstractWebContainer
    */
   public class Tomcat5 extends AbstractWebContainer
  @@ -392,12 +393,30 @@
         PolicyContext.registerHandler(HttpServletRequestPolicyContextHandler.WEB_REQUEST_KEY,
            handler, false);
   
  -      // Register for notification of the overall server startup
  -      server.addNotificationListener(ServerImplMBean.OBJECT_NAME, this, null, null);
  -
         // Invoke the super method to register as a deployer
  +      // This will cause waiting deployments to be deployed        
         super.startService();
   
  +      // If we are hot-deployed *after* the overall server is started  
  +      // we'll never receive Server.START_NOTIFICATION_TYPE, so check  
  +      // with the Server and start the connectors immediately, if this is the case.  
  +      // Otherwise register to receive the server start-up notification.  
  +      Boolean started = (Boolean)server.getAttribute(ServerImplMBean.OBJECT_NAME, "Started");  
  +      if (started.booleanValue() == true)  
  +      {  
  +         log.debug("Server '" + ServerImplMBean.OBJECT_NAME +  
  +               "' already started, starting connectors now");           
  +           
  +         startConnectors();  
  +      }  
  +      else  
  +      {  
  +         // Register for notification of the overall server startup  
  +         log.debug("Server '" + ServerImplMBean.OBJECT_NAME +  
  +               "' not started, registering for start-up notification");  
  +           
  +         server.addNotificationListener(ServerImplMBean.OBJECT_NAME, this, null, null);           
  +      }      
      }
   
   
  @@ -461,6 +480,9 @@
            Lifecycle lc = (Lifecycle) connectors[n];
            lc.start();
         }
  +      // Notify listeners that connectors have started processing requests  
  +      sendNotification(new Notification(TOMCAT_CONNECTORS_STARTED,  
  +            this, getNextNotificationSequenceNumber()));      
      }
   
      public void stopConnectors() throws Exception
  
  
  
  1.12.2.1.18.1 +4 -1      jboss-tomcat/src/main/org/jboss/web/tomcat/tc5/Tomcat5MBean.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Tomcat5MBean.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-tomcat/src/main/org/jboss/web/tomcat/tc5/Tomcat5MBean.java,v
  retrieving revision 1.12.2.1
  retrieving revision 1.12.2.1.18.1
  diff -u -b -r1.12.2.1 -r1.12.2.1.18.1
  --- Tomcat5MBean.java	10 Oct 2004 20:14:47 -0000	1.12.2.1
  +++ Tomcat5MBean.java	21 Jul 2006 11:34:11 -0000	1.12.2.1.18.1
  @@ -18,11 +18,14 @@
    *
    * @author Scott.Stark at jboss.org
    * @author Costin Manolache
  - * @version $Revision: 1.12.2.1 $
  + * @version $Revision: 1.12.2.1.18.1 $
    * @see AbstractWebContainerMBean
    */
   public interface Tomcat5MBean extends AbstractWebContainerMBean
   {
  +   /** JMX notification type to signal after-start connector event */   
  +   public final String TOMCAT_CONNECTORS_STARTED  = "jboss.tomcat.connectors.started";  
  +           
      /**
       * @return the jmx domain for the tomcat management mbeans
       */
  
  
  



More information about the jboss-cvs-commits mailing list