remm        2002/09/18 03:04:38

  Modified:    catalina/src/share/org/apache/catalina/mbeans
                        MBeanFactory.java
  Log:
  - Contexts created were not properly configured. Now, they are deployed in the
    same way they would be if they were read from server.xml.
  
  Revision  Changes    Path
  1.39      +9 -4      
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.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- MBeanFactory.java 13 Sep 2002 01:35:22 -0000      1.38
  +++ MBeanFactory.java 18 Sep 2002 10:04:38 -0000      1.39
  @@ -102,6 +102,7 @@
   import org.apache.catalina.realm.MemoryRealm;
   import org.apache.catalina.realm.UserDatabaseRealm;
   import org.apache.catalina.session.StandardManager;
  +import org.apache.catalina.startup.ContextConfig;
   import org.apache.catalina.valves.AccessLogValve;
   import org.apache.catalina.valves.RemoteAddrValve;
   import org.apache.catalina.valves.RemoteHostValve;
  @@ -825,6 +826,8 @@
           path = getPathStr(path);
           context.setPath(path);
           context.setDocBase(docBase);
  +        ContextConfig contextConfig = new ContextConfig();
  +        context.addLifecycleListener(contextConfig);
   
           // Add the new instance to its parent component
           ObjectName pname = new ObjectName(parent);
  @@ -832,6 +835,8 @@
           Service service = server.findService(pname.getKeyProperty("service"));
           Engine engine = (Engine) service.getContainer();
           Host host = (Host) engine.findChild(pname.getKeyProperty("host"));
  +
  +        // Add context to the host
           host.addChild(context);
   
           // Return the corresponding MBean name
  
  
  

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

Reply via email to