pero        2005/01/29 11:37:27

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanFactory.java mbeans-descriptors.xml
  Log:
  Fix createStandardHost and removeHost
  
  Revision  Changes    Path
  1.34      +12 -5     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
  
  Index: MBeanFactory.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- MBeanFactory.java 8 Jan 2005 11:24:24 -0000       1.33
  +++ MBeanFactory.java 29 Jan 2005 19:37:27 -0000      1.34
  @@ -736,8 +736,10 @@
        * @exception Exception if an MBean cannot be created or registered
        */
       public String createStandardHost(String parent, String name,
  -                                     String appBase, boolean autoDeploy,
  -                                     boolean deployXML, boolean liveDeploy,  
                                    
  +                                     String appBase,
  +                                     boolean autoDeploy,
  +                                     boolean deployOnStartup,
  +                                     boolean deployXML,                      
                 
                                        boolean unpackWARs,
                                        boolean xmlNamespaceAware,
                                        boolean xmlValidation)
  @@ -748,8 +750,8 @@
           host.setName(name);
           host.setAppBase(appBase);
           host.setAutoDeploy(autoDeploy);
  +        host.setDeployOnStartup(deployOnStartup);
           host.setDeployXML(deployXML);
  -        host.setLiveDeploy(liveDeploy);
           host.setUnpackWARs(unpackWARs);
           host.setXmlNamespaceAware(xmlNamespaceAware);
           host.setXmlValidation(xmlValidation);
  @@ -996,7 +998,12 @@
           Host host = (Host) engine.findChild(hostName);
   
           // Remove this component from its parent component
  -        engine.removeChild(host);
  +        if(host!=null) {
  +            if(host instanceof StandardHost)
  +                ((StandardHost)host).destroy();
  +            else
  +                engine.removeChild(host);
  +        }
   
       }
   
  
  
  
  1.28      +20 -5     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml
  
  Index: mbeans-descriptors.xml
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- mbeans-descriptors.xml    1 Dec 2004 11:09:15 -0000       1.27
  +++ mbeans-descriptors.xml    29 Jan 2005 19:37:27 -0000      1.28
  @@ -225,14 +225,29 @@
         <parameter name="name"
             description="Unique name of this Host"
                    type="java.lang.String"/>
  -      <parameter name="appBase"
  -          description="Application base directory for this Host"
  -                 type="java.lang.String"/>
  +      <parameter name="autoDeploy"
  +          description="The auto deploy flag for this Host"
  +               type="boolean"/>           
  +      <parameter name="deployOnStartup"
  +          description="The deploy on startup flag for this Host"
  +               type="boolean"/>
  +      <parameter name="deployXML"
  +          description="deploy Context XML config files property"
  +               type="boolean"/> 
         <parameter name="unpackWARs"
  -          description="Should we unpack WARs when auto-deploying?"
  -                 type="boolean"/>
  +          description="Unpack WARs property"
  +               type="boolean"/>
  +      <parameter name="xmlNamespaceAware"
  +          description="Attribute value used to turn on/off XML namespace 
awareness"
  +               type="boolean"/>
  +      <parameter name="xmlValidation"
  +               description="Attribute value used to turn on/off XML 
validation"
  +               type="boolean"/>
       </operation>
   
  +
  +
  +
       <operation   name="createStandardManager"
             description="Create a new StandardManager"
                  impact="ACTION"
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to