tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amy Roh <amy...@apache.org>
Subject Re: cvs commit: jakarta-tomcat-5/resources mbeans.xml
Date Tue, 18 Feb 2003 21:24:34 GMT
costin@apache.org wrote:
> costin      2003/02/16 20:38:45
> 
>   Modified:    resources mbeans.xml
>   Log:
>   Few cosmetic changes in names.
>   
>   Add a context using JMX ( /admin1 ). The procedure is simple:
>   1. create an mbean using the o.a....StandardContext as code and the JSR77 name.
>   2. Call start()
>   3. Enjoy :-)

Awesome!  :-)

What is the status of tomcat5 JMX support (including dynamic configs)? 
Do you have a todo list or howto docs?  I'd like to help now that I 
think I have some more time to spend.

Thanks,
Amy

>   
>   The context will use the domain to locate the engine and will insert itself in
>   the running server.
>   
>   To remove the context - just call the "stop" method on the JSR77 name.
>   
>   Revision  Changes    Path
>   1.5       +30 -5     jakarta-tomcat-5/resources/mbeans.xml
>   
>   Index: mbeans.xml
>   ===================================================================
>   RCS file: /home/cvs/jakarta-tomcat-5/resources/mbeans.xml,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- mbeans.xml	16 Jan 2003 23:16:12 -0000	1.4
>   +++ mbeans.xml	17 Feb 2003 04:38:45 -0000	1.5
>   @@ -11,8 +11,10 @@
>      <property name="tomcat.src" location=".." />
>      <property name="catalina.src" location="../../jakarta-tomcat-catalina" />
>      <property name="jakarta-commons" location="${base.src}/jakarta-commons" />
>   +<!--
>   +  <property name="jmx.home" location="${base.dir}/mx4j-1.1.1" />
>   +-->
>      <property name="jmx.home" location="${base.dir}/jmx-ri_1.2" />
>   -
>      <property name="tomcat.home" location="${tomcat.src}/build" />
>    
>      <property name="commons-modeler.home" location="${jakarta-commons}/modeler/dist"
/>
>   @@ -23,6 +25,11 @@
>    
>      <path id="tomcatCP-extra" /> 
>    
>   +  <!--
>   +  <taskdef name="commons-logger" classname="org.apache.tools.ant.listener.CommonsLoggingListener"/>
>   +  <commons-logger/>
>   +  -->
>   +
>      <target name="init" unless="init.done">
>        <property name="tomcat.home" location=".." />
>    
>   @@ -156,21 +163,39 @@
>    
>      <target name="run" depends="init"
>            description="Start tomcat as an mbean using server.xml config and returns">
>   +    <property name="domain" value="Catalina" />
>    
>        <modeler code="org.apache.catalina.startup.Catalina"
>   -          name="Catalina:type=server" />
>   +          name="${domain}:type=server" />
>    
>   -    <jmxSet objectName="Catalina:type=server"
>   +    <jmxSet objectName="${domain}:type=server"
>                attribute="catalinaHome"
>                value="${tomcat.home}"/>
>      
>        <!-- We could also call init and set other properties - 
>             init should load the modules -->
>    
>   -    <jmx objectName="Catalina:type=server"
>   +    <jmx objectName="${domain}:type=server"
>             operation="start" />
>   -    
>   +
>   +
>        <echo message="Tomcat5 running"/>
>   +
>   +    <!-- let's add a context - using JMX -->
>   +    <property name="admin1Name" 
>   +              value="${domain}:j2eeType=WebModule,name=//localhost/admin1,J2EEApplication=none,J2EEServer=none"
/>
>   +
>   +    <modeler code="org.apache.catalina.core.StandardContext"
>   +           name="${admin1Name}" />
>   +
>   +    <jmxSet objectName="${admin1Name}"
>   +            attribute="docBase"
>   +            value="${tomcat.home}/server/webapps/admin" />
>   +
>   +    <jmx objectName="${admin1Name}"
>   +         operation="init" />
>   +
>   +    
>      </target>
>    
>      <!-- ==================== Await ==================== 
>   
>   
>   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org
> 




---------------------------------------------------------------------
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