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 :-)
  
  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to