manveen     02/03/25 17:23:26

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanFactory.java
  Log:
  fix for createWebappLoader, createStandardManager, create*Realms.
  
  Revision  Changes    Path
  1.21      +19 -18    
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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- MBeanFactory.java 22 Mar 2002 19:27:26 -0000      1.20
  +++ MBeanFactory.java 26 Mar 2002 01:23:25 -0000      1.21
  @@ -1,7 +1,7 @@
   /*
  - * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.20 2002/03/22 19:27:26 amyroh Exp $
  - * $Revision: 1.20 $
  - * $Date: 2002/03/22 19:27:26 $
  + * $Header: 
/home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v
 1.21 2002/03/26 01:23:25 manveen Exp $
  + * $Revision: 1.21 $
  + * $Date: 2002/03/26 01:23:25 $
    *
    * ====================================================================
    *
  @@ -63,7 +63,6 @@
   
   package org.apache.catalina.mbeans;
   
  -
   import javax.management.MBeanException;
   import javax.management.MBeanServer;
   import javax.management.ObjectName;
  @@ -116,7 +115,7 @@
    * <code>org.apache.catalina.core.StandardServer</code> component.</p>
    *
    * @author Amy Roh
  - * @version $Revision: 1.20 $ $Date: 2002/03/22 19:27:26 $
  + * @version $Revision: 1.21 $ $Date: 2002/03/26 01:23:25 $
    */
   
   public class MBeanFactory extends BaseModelMBean {
  @@ -273,13 +272,12 @@
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
           String type = pname.getKeyProperty("type");
  -        // FIX ME 
           // String tname = findObjectName(type);
           String tname = type;
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -382,11 +380,12 @@
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
           String type = pname.getKeyProperty("type");
  -        String tname = findObjectName(type);
  +        // String tname = findObjectName(type);
  +        String tname = type;
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -423,11 +422,12 @@
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
           String type = pname.getKeyProperty("type");
  -        String tname = findObjectName(type);
  +        // String tname = findObjectName(type);
  +        String tname = type;
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -464,11 +464,12 @@
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
           String type = pname.getKeyProperty("type");
  -        String tname = findObjectName(type);
  +        // String tname = findObjectName(type);
  +        String tname = type;
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -839,7 +840,8 @@
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        //if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {        
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -876,13 +878,12 @@
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
           String type = pname.getKeyProperty("type");
  -        // FIX ME
           //String tname = findObjectName(type);
           String tname = type;
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -923,7 +924,7 @@
           Server server = ServerFactory.getServer();
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
  -        if (tname.equals("StandardContext")) {
  +        if (tname.equals("Context")) {
               Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
               Context context =
                       (Context) host.findChild(pname.getKeyProperty("path"));
  @@ -1068,7 +1069,7 @@
           // Acquire a reference to the component to be removed
           ObjectName oname = new ObjectName(name);
           String serviceName = oname.getKeyProperty("service");
  -        String hostName = oname.getKeyProperty("name");
  +        String hostName = oname.getKeyProperty("host");
           Server server = ServerFactory.getServer();
           Service service = server.findService(serviceName);
           Engine engine = (Engine) service.getContainer();
  
  
  

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

Reply via email to