You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by am...@apache.org on 2002/01/23 10:53:08 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java mbeans-descriptors.xml

amyroh      02/01/23 01:53:08

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanFactory.java mbeans-descriptors.xml
  Log:
  Add necessary parameters to createXxxx in order to be used in MBeanUtils.createObjectName().
  
  Revision  Changes    Path
  1.2       +25 -23    jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java
  
  Index: MBeanFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MBeanFactory.java	22 Jan 2002 23:50:38 -0000	1.1
  +++ MBeanFactory.java	23 Jan 2002 09:53:08 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.1 2002/01/22 23:50:38 amyroh Exp $
  - * $Revision: 1.1 $
  - * $Date: 2002/01/22 23:50:38 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v 1.2 2002/01/23 09:53:08 amyroh Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/01/23 09:53:08 $
    *
    * ====================================================================
    *
  @@ -102,7 +102,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.1 $ $Date: 2002/01/22 23:50:38 $
  + * @version $Revision: 1.2 $ $Date: 2002/01/23 09:53:08 $
    */
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -256,11 +256,12 @@
        * Create a new HTTP/1.0 Connector.
        *
        * @param parent MBean Name of the associated parent component
  -     * ? @param address The IP address on which to bind ?
  -     * ? @param port TCP port number to listen on ?
  +     * @param address The IP address on which to bind
  +     * @param port TCP port number to listen on
  +     *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public String createHttp10Connector(String parent)
  +    public String createHttp10Connector(String parent, String address, int port)
           throws Exception {
   
           ManagedBean managed = registry.findManagedBean(parent);
  @@ -280,9 +281,8 @@
           org.apache.catalina.connector.http10.HttpConnector connector =
               new org.apache.catalina.connector.http10.HttpConnector();
   
  -        //connector.setAddress(address);
  -        //connector.setPort(port);
  -        //service.addConnector(connector);
  +        connector.setAddress(address);
  +        connector.setPort(port);
           connector.setService(service);
   
           ObjectName oname = MBeanUtils.createObjectName(domain, connector);
  @@ -298,11 +298,12 @@
        * Create a new HTTP/1.1 Connector.
        *
        * @param parent MBean Name of the associated parent component
  -     * ? @param address The IP address on which to bind ?
  -     * ? @param port TCP port number to listen on ?
  +     * @param address The IP address on which to bind
  +     * @param port TCP port number to listen on
  +     *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public String createHttp11Connector(String parent)
  +    public String createHttp11Connector(String parent, String address, int port))
           throws Exception {
   
           ManagedBean managed = registry.findManagedBean(parent);
  @@ -322,9 +323,8 @@
           org.apache.catalina.connector.http.HttpConnector connector =
               new org.apache.catalina.connector.http.HttpConnector();
   
  -        //connector.setAddress(address);
  -        //connector.setPort(port);
  -        //service.addConnector(connector);
  +        connector.setAddress(address);
  +        connector.setPort(port);
           connector.setService(service);
   
           ObjectName oname = MBeanUtils.createObjectName(domain, connector);
  @@ -592,10 +592,11 @@
        * Create a new StandardContext.
        *
        * @param parent MBean Name of the associated parent component
  +     * @param path The context path for this Context
        *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public String createStandardContext(String parent)
  +    public String createStandardContext(String parent, String path)
           throws Exception {
   
           ManagedBean managed = registry.findManagedBean(parent);
  @@ -613,8 +614,7 @@
           Host host = null;
           StandardContext context = new StandardContext();
   
  -        //context.setDocBase(docBase);
  -        //context.setPath(path);
  +        context.setPath(path);
           context.setParent(host);
   
           ObjectName oname = MBeanUtils.createObjectName(domain, context);
  @@ -667,10 +667,11 @@
        * Create a new StandardHost.
        *
        * @param parent MBean Name of the associated parent component
  +     * @param name Unique name of this Host
        *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public String createStandardHost(String parent)
  +    public String createStandardHost(String parent, String name)
           throws Exception {
   
           ManagedBean managed = registry.findManagedBean(parent);
  @@ -688,7 +689,7 @@
           Engine engine = null;
           StandardHost host = new StandardHost();
   
  -        //host.setName(name);
  +        host.setName(name);
           host.setParent(engine);
   
           ObjectName oname = MBeanUtils.createObjectName(domain, host);
  @@ -740,10 +741,11 @@
        * Create a new StandardService.
        *
        * @param parent MBean Name of the associated parent component
  +     * @param name Unique name of this Service
        *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public String createStandardService(String parent)
  +    public String createStandardService(String parent, String name)
           throws Exception {
   
           ManagedBean managed = registry.findManagedBean(parent);
  @@ -761,7 +763,7 @@
           Server server = null;
           StandardService service = new StandardService();
   
  -        //service.setName(name);
  +        service.setName(name);
           service.setServer(server);
   
           ObjectName oname = MBeanUtils.createObjectName(domain, service);
  
  
  
  1.19      +22 -1     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.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- mbeans-descriptors.xml	22 Jan 2002 23:22:24 -0000	1.18
  +++ mbeans-descriptors.xml	23 Jan 2002 09:53:08 -0000	1.19
  @@ -6,7 +6,7 @@
   <!--
        Descriptions of JMX MBeans for Catalina
   
  -     $Id: mbeans-descriptors.xml,v 1.18 2002/01/22 23:22:24 craigmcc Exp $
  +     $Id: mbeans-descriptors.xml,v 1.19 2002/01/23 09:53:08 amyroh Exp $
    -->
   
   <mbeans-descriptors>
  @@ -429,6 +429,12 @@
         <parameter name="parent"
             description="MBean Name of the associated parent component"
                    type="java.lang.String"/>
  +      <parameter name="address"
  +          description="The IP address on which to bind"
  +                 type="java.lang.String"/>
  +      <parameter name="port"
  +          description="TCP port number to listen on"
  +                 type="int"/>
       </operation>
   
       <operation   name="createHttp11Connector"
  @@ -438,6 +444,12 @@
         <parameter name="parent"
             description="MBean Name of the associated parent component"
                    type="java.lang.String"/>
  +      <parameter name="address"
  +          description="The IP address on which to bind"
  +                 type="java.lang.String"/>
  +      <parameter name="port"
  +          description="TCP port number to listen on"
  +                 type="int"/>
       </operation>
   
       <operation   name="createJDBCRealm"
  @@ -510,6 +522,9 @@
         <parameter name="parent"
             description="MBean Name of the associated parent component"
                    type="java.lang.String"/>
  +      <parameter name="path"
  +          description="path The context path for this Context"
  +                 type="java.lang.String"/>
       </operation>
   
       <operation   name="createStandardEngine"
  @@ -525,6 +540,9 @@
             description="Create a new StandardHost"
                  impact="ACTION"
              returnType="java.lang.String">
  +      <parameter name="name"
  +          description="Unique name of this Host"
  +                 type="java.lang.String"/>
         <parameter name="parent"
             description="MBean Name of the associated parent component"
                    type="java.lang.String"/>
  @@ -545,6 +563,9 @@
              returnType="java.lang.String">
         <parameter name="parent"
             description="MBean Name of the associated parent component"
  +                 type="java.lang.String"/>
  +      <parameter name="name"
  +          description="Unique name of this Service"
                    type="java.lang.String"/>
       </operation>
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>