tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-5/resources/mbeans tomcat5-ant.xml
Date Fri, 07 Mar 2003 15:34:12 GMT
costin      2003/03/07 07:34:12

  Modified:    resources/mbeans tomcat5-ant.xml
  Log:
  Added a "run2" target that uses only mbeans, no external config.
  
  Don't try to run it yet - there are a dozen of NPEs fixes I need to
  check in.
  
  Revision  Changes    Path
  1.3       +64 -9     jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml
  
  Index: tomcat5-ant.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-5/resources/mbeans/tomcat5-ant.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- tomcat5-ant.xml	28 Feb 2003 04:56:54 -0000	1.2
  +++ tomcat5-ant.xml	7 Mar 2003 15:34:12 -0000	1.3
  @@ -16,6 +16,7 @@
         <!-- Just include everything for now 
          -->
         <fileset dir="${tomcat.home}/lib" includes="*.jar"/>
  +      <pathelement  path="${tomcat.home}/classes"/>
       </path>
   
       <taskdef resource="org/apache/commons/modeler/ant/ant.properties"
  @@ -61,7 +62,6 @@
     <target name="run" depends="init"
           description="Start tomcat as an mbean using server.xml config and returns">
   
  -
       <jmx-service>
          <mbean code="org.apache.catalina.startup.Catalina"
                 name="${domain}:type=server" 
  @@ -72,20 +72,77 @@
       </jmx-service>
   
       <echo message="Tomcat5 running"/>
  +  </target>
  +
  +
  +  <target name="run2" depends="init"
  +        description="Start tomcat as an mbean, no server.xml">
  +
  +    <modelerRegistry resource="org/apache/catalina/mbeans/mbeans-descriptors.xml" />
   
  -    <!-- let's add a context - using JMX. 
  -         That will fail with class loader problems... XXX 
  -      -->
   
       <jmx-service>
  -       <mbean name="${domain}:j2eeType=WebModule,name=//localhost/servlet-examples,J2EEApplication=none,J2EEServer=none"

  +<!--
  +      Should be optional - but the name is used in several places.
  +      The whole name should disapear - use domain instead
  +-->
  +       <mbean name="${domain}:type=Service,name=Tomcat-Standalone" 
  +              code="org.apache.catalina.core.StandardService"
  +              modeler="true">
  +         <attribute name="name" value="Tomcat-Standalone"/>
  +       </mbean>
  +
  +       <mbean name="${domain}:type=Engine,name=Tomcat-Standalone" 
  +              code="org.apache.catalina.core.StandardEngine"
  +              modeler="true">
  +         <attribute name="name" value="Tomcat-Standalone"/>
  +         <attribute name="baseDir" value="/opt/50"/>
  +         <attribute name="defaultHost" value="localhost"/>
  +       </mbean>
  +
  +<!--
  +       <mbean name="${domain}:type=Connector,port=9009" 
  +              code="org.apache.coyote.tomcat5.CoyoteConnector"
  +              modeler="true">
  +         <attribute name="protocolHandlerClassName"
  +                    value="org.apache.jk.server.JkCoyoteHandler" />
  +       </mbean>
  +-->
  +
  +       <mbean name="${domain}:type=Connector,port=9080" 
  +              code="org.apache.coyote.tomcat5.CoyoteConnector"
  +              modeler="true">
  +          <attribute name="port" value="9080" />
  +       </mbean>
  +
  +<!--
  +       <mbean name="${domain}:type=DefaultContext,host=localhost,Service=Tomcat-Standalone"

  +              code="org.apache.catalina.core.StandardDefaultContext"
  +              modeler="true">
  +       </mbean>
  +-->
  +
  +       <mbean name="${domain}:type=Host,host=localhost,Service=Tomcat-Standalone" 
  +              code="org.apache.catalina.core.StandardHost"
  +              modeler="true">
  +         <attribute name="name" value="localhost1"/>
  +       </mbean>
  +
  +       <mbean name="${domain}:j2eeType=WebModule,name=//localhost/,J2EEApplication=none,J2EEServer=none"

                 code="org.apache.catalina.core.StandardContext"
                 modeler="true">
            <attribute name="docBase"
  -                    value="/ws/50/build/webapps/servlet-examples" />
  +                    value="/ws/50/build/webapps/ROOT" />
  +         <attribute name="privileged"
  +                    value="true" />
          </mbean>
       </jmx-service>
  -    
  +
  +    <echo message="Tomcat5 running"/>
  +
  +    <!-- XXX hack - I need to make the threads non-daemon -->
  +    <sleep hours="1"/>
  +
     </target>
   
     <!-- ==================== Await ==================== 
  @@ -94,10 +151,8 @@
       -->
     <target name="await" depends="init"
           description="Wait for tomcat stop. Call this target after run">
  -
       <jmx objectName="${domain}:type=server"
            operation="await" />
  -
     </target>
   
     <target name="start" depends="init,run,await" description="Start tomcat, wait for
stop message"/>
  
  
  

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


Mime
View raw message