tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amy...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans MBeanFactory.java MBeanUtils.java StandardServerMBean.java
Date Thu, 07 Feb 2002 19:18:40 GMT
amyroh      02/02/07 11:18:40

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanFactory.java MBeanUtils.java
                        StandardServerMBean.java
  Log:
  Change class names so it's compatible with registry object names.
  
  Revision  Changes    Path
  1.6       +14 -12    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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MBeanFactory.java	6 Feb 2002 22:03:54 -0000	1.5
  +++ MBeanFactory.java	7 Feb 2002 19:18:40 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
1.5 2002/02/06 22:03:54 amyroh Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/02/06 22:03:54 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
1.6 2002/02/07 19:18:40 amyroh Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/07 19:18:40 $
    *
    * ====================================================================
    *
  @@ -76,6 +76,8 @@
   import org.apache.catalina.Service;
   import org.apache.catalina.authenticator.SingleSignOn;
   import org.apache.catalina.core.StandardContext;
  +import org.apache.catalina.core.StandardServer;
  +import org.apache.catalina.core.StandardService;
   import org.apache.catalina.core.StandardDefaultContext;
   import org.apache.catalina.core.StandardEngine;
   import org.apache.catalina.core.StandardHost;
  @@ -102,7 +104,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.5 $ $Date: 2002/02/06 22:03:54 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/07 19:18:40 $
    */
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -648,14 +650,14 @@
               domain = mserver.getDefaultDomain();
           ObjectName pname = new ObjectName(parent);
           Object obj = mserver.getAttribute(pname, "managedResource");
  -        Service service = null;
  -        if (obj instanceof Service) {
  -            service = (Service) obj;
  +        StandardService service = null;
  +        if (obj instanceof StandardService) {
  +            service = (StandardService) obj;
           }
           StandardEngine engine = new StandardEngine();
           engine.setService(service);
           ObjectName oname = MBeanUtils.createObjectName(domain, service);
  -        MBeanUtils.createMBean(service);
  +        MBeanUtils.createMBean(engine);
           engine.setService(null);
   
           return (oname.toString());
  @@ -739,7 +741,7 @@
        * Create a new StandardService.
        *
        * @param parent MBean Name of the associated parent component
  -     * @param name Unique name of this Service
  +     * @param name Unique name of this StandardService
        *
        * @exception Exception if an MBean cannot be created or registered
        */
  @@ -755,9 +757,9 @@
               domain = mserver.getDefaultDomain();
           ObjectName pname = new ObjectName(parent);
           Object obj = mserver.getAttribute(pname, "managedResource");
  -        Server server = null;
  -        if (obj instanceof Server) {
  -            server = (Server) obj;
  +        StandardServer server = null;
  +        if (obj instanceof StandardServer) {
  +            server = (StandardServer) obj;
           }
           StandardService service = new StandardService();
           service.setName(name);
  
  
  
  1.19      +6 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java
  
  Index: MBeanUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- MBeanUtils.java	4 Feb 2002 20:28:49 -0000	1.18
  +++ MBeanUtils.java	7 Feb 2002 19:18:40 -0000	1.19
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
1.18 2002/02/04 20:28:49 amyroh Exp $
  - * $Revision: 1.18 $
  - * $Date: 2002/02/04 20:28:49 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v
1.19 2002/02/07 19:18:40 amyroh Exp $
  + * $Revision: 1.19 $
  + * $Date: 2002/02/07 19:18:40 $
    *
    * ====================================================================
    *
  @@ -97,6 +97,7 @@
   import org.apache.catalina.UserDatabase;
   import org.apache.catalina.Valve;
   import org.apache.catalina.connector.http.HttpConnector;
  +import org.apache.catalina.core.StandardService;
   import org.apache.catalina.valves.ValveBase;
   import org.apache.commons.modeler.ManagedBean;
   import org.apache.commons.modeler.Registry;
  @@ -107,7 +108,7 @@
    *
    * @author Craig R. McClanahan
    * @author Amy Roh
  - * @version $Revision: 1.18 $ $Date: 2002/02/04 20:28:49 $
  + * @version $Revision: 1.19 $ $Date: 2002/02/07 19:18:40 $
    */
   
   public class MBeanUtils {
  @@ -542,7 +543,7 @@
        *
        * @exception Exception if an MBean cannot be created or registered
        */
  -    public static ModelMBean createMBean(Service service)
  +    public static ModelMBean createMBean(StandardService service)
           throws Exception {
   
           String mname = createManagedName(service);
  
  
  
  1.6       +9 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java
  
  Index: StandardServerMBean.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- StandardServerMBean.java	29 Jan 2002 23:10:49 -0000	1.5
  +++ StandardServerMBean.java	7 Feb 2002 19:18:40 -0000	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.5 2002/01/29 23:10:49 amyroh Exp $
  - * $Revision: 1.5 $
  - * $Date: 2002/01/29 23:10:49 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/StandardServerMBean.java,v
1.6 2002/02/07 19:18:40 amyroh Exp $
  + * $Revision: 1.6 $
  + * $Date: 2002/02/07 19:18:40 $
    *
    * ====================================================================
    *
  @@ -70,6 +70,7 @@
   import javax.management.RuntimeOperationsException;
   import org.apache.catalina.Server;
   import org.apache.catalina.Service;
  +import org.apache.catalina.core.StandardServer;
   import org.apache.catalina.core.StandardService;
   import org.apache.commons.modeler.BaseModelMBean;
   
  @@ -79,7 +80,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.5 $ $Date: 2002/01/29 23:10:49 $
  + * @version $Revision: 1.6 $ $Date: 2002/02/07 19:18:40 $
    */
   
   public class StandardServerMBean extends BaseModelMBean {
  @@ -128,12 +129,12 @@
       public void addService(String service)
           throws Exception {
   
  -        Server server = (Server) this.resource;
  +        StandardServer server = (StandardServer) this.resource;
           ObjectName oname = new ObjectName(service);
           Object obj = mserver.getAttribute(oname, "managedResource");
  -        Service serviceObj = null;
  -        if (obj instanceof Service) {
  -            serviceObj = (Service) obj;
  +        StandardService serviceObj = null;
  +        if (obj instanceof StandardService) {
  +            serviceObj = (StandardService) obj;
           }
           server.addService(serviceObj);
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message