costin      2003/03/17 11:28:19

  Modified:    resources/mbeans tomcat5-ant.xml
  Log:
  More friendly startup for the console ( detect jmxri or mx4j )
  
  Removed service
  
  Added /admin ( commented out for now )
  
  Revision  Changes    Path
  1.6       +30 -7     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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- tomcat5-ant.xml   12 Mar 2003 15:48:45 -0000      1.5
  +++ tomcat5-ant.xml   17 Mar 2003 19:28:18 -0000      1.6
  @@ -22,6 +22,14 @@
       <taskdef resource="org/apache/commons/modeler/ant/ant.properties"
                classpathref="tomcatCP" />
       <property name="init.done" value="true"/>
  +
  +    <available classname="com.sun.jdmk.comm.HtmlAdaptorServer"
  +               property="jmxritools-available" 
  +               classpathref="tomcatCP" />
  +
  +    <available classname="mx4j.adaptor.http.XSLTProcessor"
  +               property="mx4jtools-available" 
  +               classpathref="tomcatCP" />
     </target>
   
   
  @@ -29,7 +37,12 @@
          Call this target if you want the console added.
       -->
   
  -  <target name="jmx-console-ri" depends="init" description="Enable JMX-RI console ( 
web interface )" >
  +  <target name="jmx-console" depends="jmx-console-ri,jmx-console-mx4j" />
  +
  +  <target name="jmx-console-ri" 
  +          depends="init" 
  +          description="Enable JMX-RI console ( web interface )" 
  +          if="jmxritools-available">
   
       <jmx-service>
         <mbean code="com.sun.jdmk.comm.HtmlAdaptorServer"
  @@ -40,7 +53,10 @@
   
     </target>
   
  -  <target name="jmx-console-mx4j" depends="init" description="Enable JMX console ( 
mx4j )" >
  +  <target name="jmx-console-mx4j" 
  +          depends="init" 
  +          description="Enable JMX console ( mx4j )" 
  +          if="mx4jtools-available">
   
       <jmx-service>
         <mbean code="mx4j.adaptor.http.XSLTProcessor"
  @@ -75,7 +91,7 @@
     </target>
   
   
  -  <target name="run2" depends="init"
  +  <target name="run2" depends="init,jmx-console"
           description="Start tomcat as an mbean, no server.xml">
   
       <modelerRegistry resource="org/apache/catalina/mbeans/mbeans-descriptors.xml" />
  @@ -86,14 +102,14 @@
         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" 
  +       <mbean name="${domain}:type=Service" 
                 code="org.apache.catalina.core.StandardService"
                 modeler="true">
            <attribute name="name" value="Tomcat-Standalone"/>
          </mbean>
   
   
  -       <mbean name="${domain}:type=Engine,name=Tomcat-Standalone" 
  +       <mbean name="${domain}:type=Engine" 
                 code="org.apache.catalina.core.StandardEngine"
                 modeler="true">
            <attribute name="name" value="Tomcat-Standalone"/>
  @@ -101,7 +117,7 @@
            <attribute name="defaultHost" value="localhost"/>
          </mbean>
   
  -       <mbean name="${domain}:type=Realm,service=Tomcat-Standalone" 
  +       <mbean name="${domain}:type=Realm" 
                 code="org.apache.catalina.realm.JAASRealm" modeler="true">
          </mbean>
   
  @@ -132,7 +148,7 @@
   
   <!-- Optional: when the context is created it'll create a host if none is found.
   -->
  -       <mbean name="${domain}:type=Host,host=localhost,service=Tomcat-Standalone" 
  +       <mbean name="${domain}:type=Host,host=localhost" 
                 code="org.apache.catalina.core.StandardHost" modeler="true">
            <attribute name="name" value="localhost"/>
          </mbean>
  @@ -159,6 +175,13 @@
            <attribute name="privileged" value="true" />
          </mbean>
   
  +<!--
  +       <mbean 
name="${domain}:j2eeType=WebModule,name=//localhost/admin,J2EEApplication=none,J2EEServer=none"
 
  +              code="org.apache.catalina.core.StandardContext"  modeler="true">
  +         <attribute name="docBase" value="/opt/50/server/webapps/admin" />
  +         <attribute name="privileged" value="true" />
  +       </mbean>
  +-->
   
       </jmx-service>
   
  
  
  

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

Reply via email to