amyroh 02/05/03 16:45:40 Modified: catalina/src/share/org/apache/catalina/mbeans ServerLifecycleListener.java mbeans-descriptors.xml Log: Add MBeans info to descriptor file and uncomment FIXMEs to enable create/destroy mbeans for global JNDI resources. Revision Changes Path 1.25 +10 -10 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java Index: ServerLifecycleListener.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- ServerLifecycleListener.java 3 May 2002 02:19:23 -0000 1.24 +++ ServerLifecycleListener.java 3 May 2002 23:45:40 -0000 1.25 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v 1.24 2002/05/03 02:19:23 craigmcc Exp $ - * $Revision: 1.24 $ - * $Date: 2002/05/03 02:19:23 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v 1.25 2002/05/03 23:45:40 amyroh Exp $ + * $Revision: 1.25 $ + * $Date: 2002/05/03 23:45:40 $ * * ==================================================================== * @@ -111,7 +111,7 @@ * * @author Craig R. McClanahan * @author Amy Roh - * @version $Revision: 1.24 $ $Date: 2002/05/03 02:19:23 $ + * @version $Revision: 1.25 $ $Date: 2002/05/03 23:45:40 $ */ public class ServerLifecycleListener @@ -402,7 +402,7 @@ if (debug >= 3) { log("Creating MBean for ContextEnvironment " + environment); } - // FIXME - MBeanUtils.createMBean(environment); + MBeanUtils.createMBean(environment); } @@ -421,7 +421,7 @@ if (debug >= 3) { log("Creating MBean for ContextResource " + resource); } - // FIXME - MBeanUtils.createMBean(resource); + MBeanUtils.createMBean(resource); } @@ -561,7 +561,7 @@ if (debug >= 2) { log("Creating MBean for NamingResources " + resources); } - // FIXME - MBeanUtils.createMBean(resources); + MBeanUtils.createMBean(resources); resources.addPropertyChangeListener(this); // Create the MBeans for each child environment entry @@ -776,7 +776,7 @@ if (debug >= 3) { log("Destroying MBean for ContextEnvironment " + environment); } - // FIXME - MBeanUtils.destroyMBean(environment); + MBeanUtils.destroyMBean(environment); } @@ -795,7 +795,7 @@ if (debug >= 3) { log("Destroying MBean for ContextResource " + resource); } - // FIXME - MBeanUtils.destroyMBean(resource); + MBeanUtils.destroyMBean(resource); } @@ -933,7 +933,7 @@ if (debug >= 2) { log("Destroying MBean for NamingResources " + resources); } - // FIXME - MBeanUtils.destroyMBean(resources); + MBeanUtils.destroyMBean(resources); resources.removePropertyChangeListener(this); } 1.55 +127 -2 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml Index: mbeans-descriptors.xml =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/mbeans-descriptors.xml,v retrieving revision 1.54 retrieving revision 1.55 diff -u -r1.54 -r1.55 --- mbeans-descriptors.xml 30 Apr 2002 22:46:07 -0000 1.54 +++ mbeans-descriptors.xml 3 May 2002 23:45:40 -0000 1.55 @@ -6,7 +6,7 @@ <!-- Descriptions of JMX MBeans for Catalina - $Id: mbeans-descriptors.xml,v 1.54 2002/04/30 22:46:07 amyroh Exp $ + $Id: mbeans-descriptors.xml,v 1.55 2002/05/03 23:45:40 amyroh Exp $ --> <mbeans-descriptors> @@ -127,7 +127,73 @@ </mbean> -<mbean name="CoyoteConnector" + <mbean name="ContextEnvironment" + className="org.apache.catalina.mbeans.ClassNameMBean" + description="Representation of an application environment entry" + domain="Catalina" + group="Resources" + type="org.apache.catalina.deploy.ContextEnvironment"> + + <attribute name="className" + description="Fully qualified class name of the managed object" + type="java.lang.String" + writeable="false"/> + + <attribute name="description" + description="The description of this environment entry" + type="java.lang.String"/> + + <attribute name="name" + description="The name of this environment entry" + type="java.lang.String"/> + + <attribute name="override" + description="Does this environment entry allow overrides by the + application deployment descriptor" + type="boolean"/> + + <attribute name="type" + description="The type of this environment entry" + type="java.lang.String"/> + + <attribute name="value" + description="The value of this environment entry" + type="java.lang.String"/> + + </mbean> + + + <mbean name="ContextResource" + className="org.apache.catalina.mbeans.ContextResourceMBean" + description="Representation of a resource reference for a web application" + domain="Catalina" + group="Resources" + type="org.apache.catalina.deploy.ContextResource"> + + <attribute name="auth" + description="The authorization requirement for this resource" + type="java.lang.String"/> + + <attribute name="description" + description="The description of this resource" + type="java.lang.String"/> + + <attribute name="name" + description="The name of this resource" + type="java.lang.String"/> + + <attribute name="scope" + description="The sharing scope of this resource factory" + type="java.lang.String"/> + + <attribute name="type" + description="The type of this environment entry" + type="java.lang.String"/> + + </mbean> + + + <mbean name="CoyoteConnector" className="org.apache.catalina.mbeans.ConnectorMBean" description="Implementation of a Coyote connector" domain="Catalina" @@ -1316,6 +1382,65 @@ <attribute name="debug" description="The debugging detail level for this component" type="int"/> + + </mbean> + + + <mbean name="NamingResources" + className="org.apache.catalina.mbeans.NamingResourcesMBean" + description="Holds and manages the naming resources defined in the + J2EE Enterprise Naming Context and their associated JNDI context" + domain="Catalina" + group="Resources" + type="org.apache.catalina.deploy.NamingResources"> + + <attribute name="environments" + description="MBean Names of the set of defined environment entries + for this web application" + type="java.lang.String[]" + writeable="false"/> + + <attribute name="resources" + description="MBean Names of all the defined resource references + for this application." + type="java.lang.String[]" + writeable="false"/> + + <operation name="addEnvironment" + description="Add an environment entry for this web application" + impact="ACTION" + returnType="void"> + <parameter name="envName" + description="New environment entry name" + type="java.lang.String"/> + </operation> + + <operation name="addResource" + description="Add a resource reference for this web application" + impact="ACTION" + returnType="void"> + <parameter name="resourceName" + description="New resource reference name" + type="java.lang.String"/> + </operation> + + <operation name="removeEnvironment" + description="Remove any environment entry with the specified name" + impact="ACTION" + returnType="void"> + <parameter name="envName" + description="Name of the environment entry to remove" + type="java.lang.String"/> + </operation> + + <operation name="removeResource" + description="Remove any resource reference with the specified name" + impact="ACTION" + returnType="void"> + <parameter name="resourceName" + description="Name of the resource reference to remove" + type="java.lang.String"/> + </operation> </mbean>
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>