remm 2004/08/16 02:31:09 Modified: catalina/src/share/org/apache/catalina/session ManagerBase.java catalina/src/share/org/apache/catalina/core StandardEngine.java StandardServer.java StandardContext.java StandardHost.java catalina/src/share/org/apache/catalina Loader.java Host.java Manager.java Engine.java catalina/src/share/org/apache/catalina/mbeans DefaultContextMBean.java MBeanFactory.java ServerLifecycleListener.java MBeanUtils.java catalina/src/share/org/apache/catalina/loader WebappLoader.java Removed: catalina/src/share/org/apache/catalina/core StandardDefaultContext.java catalina/src/share/org/apache/catalina DefaultContext.java Log: - Remove DefaultContext. - This will need cleanups. - For management, I think we should register dummy Context objects with special JMX names. Revision Changes Path 1.31 +1 -32 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java Index: ManagerBase.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/session/ManagerBase.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- ManagerBase.java 15 Jul 2004 19:12:45 -0000 1.30 +++ ManagerBase.java 16 Aug 2004 09:31:05 -0000 1.31 @@ -38,7 +38,6 @@ import javax.management.ObjectName; import org.apache.catalina.Container; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Manager; import org.apache.catalina.Session; @@ -89,12 +88,6 @@ /** - * The DefaultContext with which this Manager is associated. - */ - protected DefaultContext defaultContext = null; - - - /** * Return the MessageDigest implementation to be used when * creating session identifiers. */ @@ -251,30 +244,6 @@ } - /** - * Return the DefaultContext with which this Manager is associated. - */ - public DefaultContext getDefaultContext() { - - return (this.defaultContext); - - } - - - /** - * Set the DefaultContext with which this Manager is associated. - * - * @param defaultContext The newly associated DefaultContext - */ - public void setDefaultContext(DefaultContext defaultContext) { - - DefaultContext oldDefaultContext = this.defaultContext; - this.defaultContext = defaultContext; - support.firePropertyChange("defaultContext", oldDefaultContext, this.defaultContext); - - } - - /** Returns the name of the implementation class. */ public String getClassName() { 1.25 +5 -63 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java Index: StandardEngine.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- StandardEngine.java 27 Feb 2004 14:58:42 -0000 1.24 +++ StandardEngine.java 16 Aug 2004 09:31:05 -0000 1.25 @@ -18,12 +18,14 @@ package org.apache.catalina.core; +import java.io.File; +import java.util.List; + import javax.management.MBeanServer; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; + import org.apache.catalina.Container; -import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Host; import org.apache.catalina.LifecycleException; @@ -35,8 +37,6 @@ import org.apache.commons.logging.LogFactory; import org.apache.commons.modeler.Registry; import org.apache.commons.modeler.modules.MbeansSource; -import java.io.File; -import java.util.List; /** * Standard implementation of the <b>Engine</b> interface. Each @@ -115,11 +115,6 @@ */ private List mbeans; - /** - * DefaultContext config - */ - private DefaultContext defaultContext; - /** * The JVM Route ID for this Tomcat instance. All Route ID's must be unique @@ -208,30 +203,6 @@ /** - * Set the DefaultContext - * for new web applications. - * - * @param defaultContext The new DefaultContext - */ - public void addDefaultContext(DefaultContext defaultContext) { - - DefaultContext oldDefaultContext = this.defaultContext; - this.defaultContext = defaultContext; - support.firePropertyChange("defaultContext", - oldDefaultContext, this.defaultContext); - - } - - - /** - * Retrieve the DefaultContext for new web applications. - */ - public DefaultContext getDefaultContext() { - return (this.defaultContext); - } - - - /** * Return the <code>Service</code> with which we are associated (if any). */ public Service getService() { @@ -273,35 +244,6 @@ } // --------------------------------------------------------- Public Methods - - - /** - * Install the StandardContext portion of the DefaultContext - * configuration into current Context. - * - * @param context current web application context - */ - public void installDefaultContext(Context context) { - - if (defaultContext != null && - defaultContext instanceof StandardDefaultContext) { - - ((StandardDefaultContext)defaultContext).installDefaultContext(context); - } - } - - - /** - * Import the DefaultContext config into a web application context. - * - * @param context web application context to import default context - */ - public void importDefaultContext(Context context) { - - if ( this.defaultContext != null ) - this.defaultContext.importDefaultContext(context); - - } /** 1.35 +1 -176 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java Index: StandardServer.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardServer.java,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- StandardServer.java 26 Jul 2004 16:04:01 -0000 1.34 +++ StandardServer.java 16 Aug 2004 09:31:06 -0000 1.35 @@ -43,7 +43,6 @@ import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Host; import org.apache.catalina.Lifecycle; @@ -1283,154 +1282,6 @@ /** - * Store the specified DefaultContext properties. - * - * @param writer PrintWriter to which we are storing - * @param indent Number of spaces to indent this element - * @param dcontext Object whose properties are being stored - * - * @exception Exception if an exception occurs while storing - */ - private void storeDefaultContext(PrintWriter writer, int indent, - DefaultContext dcontext) - throws Exception { - - // Store the beginning of this element - for (int i = 0; i < indent; i++) { - writer.print(' '); - } - writer.print("<DefaultContext"); - storeAttributes(writer, dcontext); - writer.println(">"); - - // Store nested <InstanceListener> elements - String iListeners[] = dcontext.findInstanceListeners(); - for (int i = 0; i < iListeners.length; i++) { - for (int j = 0; j < indent; j++) { - writer.print(' '); - } - writer.print("<InstanceListener>"); - writer.print(iListeners[i]); - writer.println("</InstanceListener>"); - } - - // Store nested <Listener> elements - if (dcontext instanceof Lifecycle) { - LifecycleListener listeners[] = - ((Lifecycle) dcontext).findLifecycleListeners(); - for (int i = 0; i < listeners.length; i++) { - if (listeners[i].getClass().getName().equals - (SERVER_LISTENER_CLASS_NAME)) { - continue; - } - storeListener(writer, indent + 2, listeners[i]); - } - } - - // Store nested <Loader> element - Loader loader = dcontext.getLoader(); - if (loader != null) { - storeLoader(writer, indent + 2, loader); - } - - // Store nested <Logger> element - /* Nested logger not currently supported on DefaultContext - Logger logger = dcontext.getLogger(); - if (logger != null) { - Logger parentLogger = null; - if (dcontext.getParent() != null) { - parentLogger = dcontext.getParent().getLogger(); - } - if (logger != parentLogger) { - storeLogger(writer, indent + 2, logger); - } - } - */ - - // Store nested <Manager> element - Manager manager = dcontext.getManager(); - if (manager != null) { - storeManager(writer, indent + 2, manager); - } - - // Store nested <Parameter> elements - ApplicationParameter[] appParams = - dcontext.findApplicationParameters(); - for (int i = 0; i < appParams.length; i++) { - for (int j = 0; j < indent + 2; j++) { - writer.print(' '); - } - writer.print("<Parameter"); - storeAttributes(writer, false, appParams[i]); - writer.println("/>"); - } - - // Store nested <Realm> element - /* Nested realm not currently supported on DefaultContext - Realm realm = dcontext.getRealm(); - if (realm != null) { - Realm parentRealm = null; - if (dcontext.getParent() != null) { - parentRealm = dcontext.getParent().getRealm(); - } - if (realm != parentRealm) { - storeRealm(writer, indent + 2, realm); - } - } - */ - - // Store nested <Resources> element - DirContext resources = dcontext.getResources(); - if (resources != null) { - storeResources(writer, indent + 2, resources); - } - - // Store nested <Valve> elements - if (dcontext instanceof Pipeline) { - Valve valves[] = ((Pipeline) dcontext).getValves(); - for (int i = 0; i < valves.length; i++) { - storeValve(writer, indent + 2, valves[i]); - } - } - - // Store nested <WrapperLifecycle> elements - String wLifecycles[] = dcontext.findWrapperLifecycles(); - for (int i = 0; i < wLifecycles.length; i++) { - for (int j = 0; j < indent; j++) { - writer.print(' '); - } - writer.print("<WrapperLifecycle>"); - writer.print(wLifecycles[i]); - writer.println("</WrapperLifecycle>"); - } - - // Store nested <WrapperListener> elements - String wListeners[] = dcontext.findWrapperListeners(); - for (int i = 0; i < wListeners.length; i++) { - for (int j = 0; j < indent; j++) { - writer.print(' '); - } - writer.print("<WrapperListener>"); - writer.print(wListeners[i]); - writer.println("</WrapperListener>"); - } - - // Store nested naming resources elements - NamingResources nresources = dcontext.getNamingResources(); - if (nresources != null) { - storeNamingResources(writer, indent + 2, nresources); - } - - // Store the ending of this element - for (int i = 0; i < indent; i++) { - writer.print(' '); - } - writer.println("</DefaultContext>"); - - } - - - /** * Store the specified Engine properties. * * @param writer PrintWriter to which we are storing @@ -1450,15 +1301,6 @@ storeAttributes(writer, engine); writer.println(">"); - // Store nested <DefaultContext> element - if (engine instanceof StandardEngine) { - DefaultContext dcontext = - ((StandardEngine) engine).getDefaultContext(); - if (dcontext != null) { - storeDefaultContext(writer, indent + 2, dcontext); - } - } - // Store nested <Host> elements (or other relevant containers) Container children[] = engine.findChildren(); for (int i = 0; i < children.length; i++) { @@ -1556,23 +1398,6 @@ storeEngine(writer, indent + 2, (Engine) children[i]); } else if (children[i] instanceof Host) { storeHost(writer, indent + 2, (Host) children[i]); - } - } - - // Store nested <DefaultContext> element - if (host instanceof StandardHost) { - DefaultContext dcontext = - ((StandardHost) host).getDefaultContext(); - if (dcontext != null) { - Container parent = host.getParent(); - if ((parent != null) && - (parent instanceof StandardEngine)) { - DefaultContext pcontext = - ((StandardEngine) parent).getDefaultContext(); - if (dcontext != pcontext) { - storeDefaultContext(writer, indent + 2, dcontext); - } - } } } 1.140 +1 -13 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.139 retrieving revision 1.140 diff -u -r1.139 -r1.140 --- StandardContext.java 30 Jul 2004 07:32:36 -0000 1.139 +++ StandardContext.java 16 Aug 2004 09:31:06 -0000 1.140 @@ -3893,18 +3893,6 @@ } */ - // Install DefaultContext configuration - if (!getOverride()) { - Container host = getParent(); - if (host instanceof StandardHost) { - ((StandardHost)host).installDefaultContext(this); - Container engine = host.getParent(); - if( engine instanceof StandardEngine ) { - ((StandardEngine)engine).installDefaultContext(this); - } - } - } - // Add missing components as necessary if (webappResources == null) { // (1) Required by Loader if (log.isDebugEnabled()) 1.34 +3 -67 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java Index: StandardHost.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardHost.java,v retrieving revision 1.33 retrieving revision 1.34 diff -u -r1.33 -r1.34 --- StandardHost.java 3 Aug 2004 03:01:03 -0000 1.33 +++ StandardHost.java 16 Aug 2004 09:31:06 -0000 1.34 @@ -18,22 +18,17 @@ package org.apache.catalina.core; -import java.io.IOException; -import java.lang.reflect.Method; -import java.net.URL; - import javax.management.MBeanServer; import javax.management.ObjectName; import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Host; -import org.apache.catalina.Realm; import org.apache.catalina.LifecycleException; +import org.apache.catalina.Realm; import org.apache.catalina.Valve; -import org.apache.catalina.valves.ValveBase; import org.apache.catalina.startup.HostConfig; +import org.apache.catalina.valves.ValveBase; import org.apache.commons.modeler.Registry; @@ -157,12 +152,6 @@ /** - * DefaultContext config - */ - private DefaultContext defaultContext; - - - /** * Attribute value used to turn on/off XML validation */ private boolean xmlValidation = false; @@ -257,30 +246,6 @@ /** - * Set the DefaultContext - * for new web applications. - * - * @param defaultContext The new DefaultContext - */ - public void addDefaultContext(DefaultContext defaultContext) { - - DefaultContext oldDefaultContext = this.defaultContext; - this.defaultContext = defaultContext; - support.firePropertyChange("defaultContext", - oldDefaultContext, this.defaultContext); - - } - - - /** - * Retrieve the DefaultContext for new web applications. - */ - public DefaultContext getDefaultContext() { - return (this.defaultContext); - } - - - /** * Return the Java class name of the Context implementation class * for new web applications. */ @@ -516,35 +481,6 @@ // --------------------------------------------------------- Public Methods - - /** - * Install the StandardContext portion of the DefaultContext - * configuration into current Context. - * - * @param context current web application context - */ - public void installDefaultContext(Context context) { - - if (defaultContext != null && - defaultContext instanceof StandardDefaultContext) { - - ((StandardDefaultContext)defaultContext).installDefaultContext(context); - } - - } - - - /** - * Import the DefaultContext config into a web application context. - * - * @param context web application context to import default context - */ - public void importDefaultContext(Context context) { - - if( this.defaultContext != null ) - this.defaultContext.importDefaultContext(context); - - } /** * Add an alias name that should be mapped to this same Host. 1.4 +1 -16 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Loader.java Index: Loader.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Loader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Loader.java 27 Feb 2004 14:58:38 -0000 1.3 +++ Loader.java 16 Aug 2004 09:31:07 -0000 1.4 @@ -79,21 +79,6 @@ /** - * Return the DefaultContext with which this Manager is associated. - */ - public DefaultContext getDefaultContext(); - - - /** - * Set the DefaultContext with which this Manager is associated. - * - * @param defaultContext The newly associated DefaultContext - */ - public void setDefaultContext(DefaultContext defaultContext); - - - - /** * Return the "follow standard delegation model" flag used to configure * our ClassLoader. */ 1.10 +1 -24 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java Index: Host.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Host.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Host.java 23 Jul 2004 22:57:35 -0000 1.9 +++ Host.java 16 Aug 2004 09:31:07 -0000 1.10 @@ -114,21 +114,6 @@ public void setConfigClass(String configClass); - /** - * Set the DefaultContext - * for new web applications. - * - * @param defaultContext The new DefaultContext - */ - public void addDefaultContext(DefaultContext defaultContext); - - - /** - * Retrieve the DefaultContext for new web applications. - */ - public DefaultContext getDefaultContext(); - - /** * Return the value of the deploy on startup flag. If true, it indicates * that this host's child webapps should be discovred and automatically @@ -196,14 +181,6 @@ // --------------------------------------------------------- Public Methods - - - /** - * Import the DefaultContext config into a web application context. - * - * @param context web application context to import default context - */ - public void importDefaultContext(Context context); /** 1.12 +1 -15 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Manager.java Index: Manager.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Manager.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- Manager.java 26 May 2004 15:28:21 -0000 1.11 +++ Manager.java 16 Aug 2004 09:31:07 -0000 1.12 @@ -63,20 +63,6 @@ /** - * Return the DefaultContext with which this Manager is associated. - */ - public DefaultContext getDefaultContext(); - - - /** - * Set the DefaultContext with which this Manager is associated. - * - * @param defaultContext The newly associated DefaultContext - */ - public void setDefaultContext(DefaultContext defaultContext); - - - /** * Return the distributable flag for the sessions supported by * this Manager. */ 1.4 +1 -27 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Engine.java Index: Engine.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/Engine.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Engine.java 27 Feb 2004 14:58:38 -0000 1.3 +++ Engine.java 16 Aug 2004 09:31:07 -0000 1.4 @@ -92,30 +92,4 @@ public void setService(Service service); - /** - * Set the DefaultContext - * for new web applications. - * - * @param defaultContext The new DefaultContext - */ - public void addDefaultContext(DefaultContext defaultContext); - - - /** - * Retrieve the DefaultContext for new web applications. - */ - public DefaultContext getDefaultContext(); - - - // --------------------------------------------------------- Public Methods - - - /** - * Import the DefaultContext config into a web application context. - * - * @param context web application context to import default context - */ - public void importDefaultContext(Context context); - - } 1.7 +3 -3 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/DefaultContextMBean.java Index: DefaultContextMBean.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/DefaultContextMBean.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- DefaultContextMBean.java 29 Jul 2004 22:11:59 -0000 1.6 +++ DefaultContextMBean.java 16 Aug 2004 09:31:08 -0000 1.7 @@ -23,7 +23,7 @@ import javax.management.ObjectName; import javax.management.RuntimeOperationsException; -import org.apache.catalina.core.StandardDefaultContext; +import org.apache.catalina.Context; import org.apache.catalina.deploy.ContextEnvironment; import org.apache.catalina.deploy.ContextResource; import org.apache.catalina.deploy.ContextResourceLink; @@ -96,7 +96,7 @@ */ private NamingResources getNamingResources() { - return ((StandardDefaultContext)this.resource).getNamingResources(); + return ((Context)this.resource).getNamingResources(); } 1.29 +7 -6 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java Index: MBeanFactory.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanFactory.java,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- MBeanFactory.java 4 Aug 2004 06:51:13 -0000 1.28 +++ MBeanFactory.java 16 Aug 2004 09:31:08 -0000 1.29 @@ -16,10 +16,8 @@ package org.apache.catalina.mbeans; -import java.lang.reflect.Constructor; -import java.lang.reflect.Method; -import java.util.Vector; import java.io.File; +import java.util.Vector; import javax.management.MBeanException; import javax.management.MBeanServer; @@ -27,7 +25,6 @@ import javax.management.RuntimeOperationsException; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Host; import org.apache.catalina.Server; @@ -38,7 +35,6 @@ import org.apache.catalina.connector.Connector; import org.apache.catalina.core.ContainerBase; import org.apache.catalina.core.StandardContext; -import org.apache.catalina.core.StandardDefaultContext; import org.apache.catalina.core.StandardEngine; import org.apache.catalina.core.StandardHost; import org.apache.catalina.core.StandardService; @@ -154,6 +150,7 @@ * Get Parent DefaultContext to add its child component * from parent's ObjectName */ + /* private DefaultContext getDefaultContext(ObjectName pname) throws Exception { @@ -172,6 +169,7 @@ } return null; } + */ /** @@ -340,6 +338,7 @@ throws Exception { // XXX FIXME // Create a new StandardDefaultContext instance + /* StandardDefaultContext context = new StandardDefaultContext(); // Add the new instance to its parent component @@ -361,6 +360,8 @@ ObjectName oname = MBeanUtils.createObjectName(managed.getDomain(), context); return (oname.toString()); + */ + return null; } 1.19 +10 -33 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java Index: ServerLifecycleListener.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/ServerLifecycleListener.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ServerLifecycleListener.java 13 Jul 2004 09:38:21 -0000 1.18 +++ ServerLifecycleListener.java 16 Aug 2004 09:31:08 -0000 1.19 @@ -25,7 +25,6 @@ import org.apache.catalina.ContainerEvent; import org.apache.catalina.ContainerListener; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Globals; import org.apache.catalina.Host; @@ -270,7 +269,7 @@ } catch (Exception e) { log.error("Exception handling Container property change", e); } - } else if (event.getSource() instanceof DefaultContext) { + }/* else if (event.getSource() instanceof DefaultContext) { try { processDefaultContextPropertyChange ((DefaultContext) event.getSource(), @@ -280,7 +279,7 @@ } catch (Exception e) { log.error("Exception handling DefaultContext property change", e); } - } else if (event.getSource() instanceof NamingResources) { + }*/ else if (event.getSource() instanceof NamingResources) { try { processNamingResourcesPropertyChange ((NamingResources) event.getSource(), @@ -482,6 +481,7 @@ * * @exception Exception if an exception is thrown during MBean creation */ + /* protected void createMBeans(DefaultContext dcontext) throws Exception { // Create the MBean for the DefaultContext itself @@ -511,6 +511,7 @@ createMBeans(resources); } + */ /** @@ -546,13 +547,6 @@ createMBeans((Host) hosts[j]); } - // Create the MBeans for DefaultContext - DefaultContext dcontext = engine.getDefaultContext(); - if (dcontext != null) { - dcontext.setParent(engine); - createMBeans(dcontext); - } - } @@ -590,13 +584,6 @@ createMBeans((Context) contexts[k]); } - // Create the MBeans for DefaultContext - DefaultContext dcontext = host.getDefaultContext(); - if (dcontext != null) { - dcontext.setParent(host); - createMBeans(dcontext); - } - } @@ -863,6 +850,7 @@ * * @exception Exception if an exception is thrown during MBean destruction */ + /* protected void destroyMBeans(DefaultContext dcontext) throws Exception { Manager dManager = dcontext.getManager(); @@ -892,6 +880,7 @@ dcontext.removePropertyChangeListener(this); } + */ /** @@ -1137,20 +1126,7 @@ ",oldValue=" + oldValue + ",newValue=" + newValue + "]"); } - if ("defaultContext".equals(propertyName)) { - if (oldValue != null) { - if (log.isDebugEnabled()) { - log.debug("Removing MBean for DefaultContext " + oldValue); - } - destroyMBeans((DefaultContext) oldValue); - } - if (newValue != null) { - if (log.isDebugEnabled()) { - log.debug("Creating MBean for DefaultContext " + newValue); - } - createMBeans((DefaultContext) newValue); - } - } else if ("loader".equals(propertyName)) { + if ("loader".equals(propertyName)) { if (oldValue != null) { if (log.isDebugEnabled()) { log.debug("Removing MBean for Loader " + oldValue); @@ -1224,6 +1200,7 @@ * * @exception Exception if an exception is thrown */ + /* protected void processDefaultContextPropertyChange(DefaultContext defaultContext, String propertyName, Object oldValue, @@ -1297,7 +1274,7 @@ } } - } + }*/ /** 1.31 +20 -14 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java Index: MBeanUtils.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/mbeans/MBeanUtils.java,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- MBeanUtils.java 29 Jul 2004 22:11:59 -0000 1.30 +++ MBeanUtils.java 16 Aug 2004 09:31:09 -0000 1.31 @@ -30,7 +30,6 @@ import org.apache.catalina.Contained; import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Group; import org.apache.catalina.Host; @@ -300,6 +299,8 @@ * * @exception Exception if an MBean cannot be created or registered */ + // FIXME + /* static ModelMBean createMBean(DefaultContext context) throws Exception { @@ -321,6 +322,7 @@ return (mbean); } + */ /** @@ -859,7 +861,7 @@ ",resourcetype=Context,path=" + path + ",host=" + host.getName() + ",name=" + environment.getName()); - } else if (container instanceof DefaultContext) { + }/* else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); if (container instanceof Host) { Host host = (Host) container; @@ -873,7 +875,7 @@ name = new ObjectName(domain + ":type=Environment" + ",resourcetype=ServiceDefaultContext,name=" + environment.getName()); } - } + }*/ return (name); @@ -913,7 +915,7 @@ ",host=" + host.getName() + ",class=" + resource.getType() + ",name=" + quotedResourceName); - } else if (container instanceof DefaultContext) { + }/* else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); if (container instanceof Host) { Host host = (Host) container; @@ -929,7 +931,7 @@ ",resourcetype=ServiceDefaultContext,class=" + resource.getType() + ",name=" + quotedResourceName); } - } + }*/ return (name); @@ -969,7 +971,7 @@ ",resourcetype=Context,path=" + path + ",host=" + host.getName() + ",name=" + quotedResourceLinkName); - } else if (container instanceof DefaultContext) { + }/* else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); if (container instanceof Host) { Host host = (Host) container; @@ -983,7 +985,7 @@ name = new ObjectName(domain + ":type=ResourceLink" + ",resourcetype=ServiceDefaultContext,name=" + quotedResourceLinkName); } - } + }*/ return (name); @@ -999,6 +1001,7 @@ * * @exception MalformedObjectNameException if a name cannot be created */ + /* static ObjectName createObjectName(String domain, DefaultContext context) throws MalformedObjectNameException { @@ -1019,6 +1022,7 @@ return (name); } + */ /** * Create an <code>ObjectName</code> for this @@ -1119,7 +1123,7 @@ Service service = engine.getService(); name = new ObjectName(domain + ":type=Loader,path=" + path + ",host=" + host.getName()); - } else if (container == null) { + }/* else if (container == null) { // What is that ??? DefaultContext defaultContext = loader.getDefaultContext(); if (defaultContext != null) { @@ -1134,7 +1138,7 @@ parent.getName()); } } - } + }*/ return (name); @@ -1175,7 +1179,7 @@ Service service = engine.getService(); name = new ObjectName(domain + ":type=Manager,path=" + path + ",host=" + host.getName()); - } else if (container == null) { + }/* else if (container == null) { DefaultContext defaultContext = manager.getDefaultContext(); if (defaultContext != null) { Container parent = defaultContext.getParent(); @@ -1189,7 +1193,7 @@ parent.getName()); } } - } + }*/ return (name); @@ -1224,7 +1228,7 @@ name = new ObjectName(domain + ":type=NamingResources" + ",resourcetype=Context,path=" + path + ",host=" + host.getName()); - } else if (container instanceof DefaultContext) { + }/* else if (container instanceof DefaultContext) { container = ((DefaultContext)container).getParent(); if (container instanceof Host) { Host host = (Host) container; @@ -1237,7 +1241,7 @@ name = new ObjectName(domain + ":type=NamingResources" + ",resourcetype=ServiceDefaultContext"); } - } + }*/ return (name); @@ -1800,6 +1804,7 @@ * * @exception Exception if an MBean cannot be deregistered */ + /* static void destroyMBean(DefaultContext context) throws Exception { @@ -1816,6 +1821,7 @@ mserver.unregisterMBean(oname); } + */ /** 1.32 +1 -33 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java Index: WebappLoader.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappLoader.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- WebappLoader.java 26 Jul 2004 15:52:17 -0000 1.31 +++ WebappLoader.java 16 Aug 2004 09:31:09 -0000 1.32 @@ -48,7 +48,6 @@ import org.apache.catalina.Container; import org.apache.catalina.Context; -import org.apache.catalina.DefaultContext; import org.apache.catalina.Engine; import org.apache.catalina.Globals; import org.apache.catalina.Lifecycle; @@ -133,12 +132,6 @@ /** - * The DefaultContext with which this Loader is associated. - */ - protected DefaultContext defaultContext = null; - - - /** * The "follow standard delegation model" flag that will be used to * configure our ClassLoader. */ @@ -260,31 +253,6 @@ setReloadable( ((Context) this.container).getReloadable() ); ((Context) this.container).addPropertyChangeListener(this); } - - } - - - /** - * Return the DefaultContext with which this Loader is associated. - * XXX What is that ??? - */ - public DefaultContext getDefaultContext() { - - return (this.defaultContext); - - } - - - /** - * Set the DefaultContext with which this Loader is associated. - * - * @param defaultContext The newly associated DefaultContext - */ - public void setDefaultContext(DefaultContext defaultContext) { - - DefaultContext oldDefaultContext = this.defaultContext; - this.defaultContext = defaultContext; - support.firePropertyChange("defaultContext", oldDefaultContext, this.defaultContext); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]