tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r412764 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
Date Thu, 08 Jun 2006 14:50:07 GMT
Author: remm
Date: Thu Jun  8 07:50:07 2006
New Revision: 412764

URL: http://svn.apache.org/viewvc?rev=412764&view=rev
Log:
- Create clustered managers with the Catalina CL set as the context CL (as classloading may
occur).
- Should fix 39699.

Modified:
    tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java?rev=412764&r1=412763&r2=412764&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContext.java Thu Jun  8 07:50:07
2006
@@ -69,6 +69,7 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.LifecycleListener;
 import org.apache.catalina.Loader;
+import org.apache.catalina.Manager;
 import org.apache.catalina.Wrapper;
 import org.apache.catalina.deploy.ApplicationParameter;
 import org.apache.catalina.deploy.ErrorPage;
@@ -4128,6 +4129,22 @@
         if (log.isDebugEnabled())
             log.debug("Processing standard container startup");
 
+        // Acquire clustered manager
+        Manager contextManager = null;
+        if (manager == null) {
+        	if ((getCluster() != null) && distributable) {
+        		try {
+        			contextManager = getCluster().createManager(getName());
+        		} catch (Exception ex) {
+        			log.error("standardContext.clusterFail", ex);
+        			ok = false;
+        		}
+        	} else {
+        		contextManager = new StandardManager();
+        	}
+        }
+        
+        
         // Binding thread
         ClassLoader oldCCL = bindThread();
 
@@ -4184,17 +4201,8 @@
                 lifecycle.fireLifecycleEvent(START_EVENT, null);
 
                 // Configure default manager if none was specified
-                if (manager == null) {
-                    if ((getCluster() != null) && distributable) {
-                        try {
-                            setManager(getCluster().createManager(getName()));
-                        } catch (Exception ex) {
-                            log.error("standardContext.clusterFail", ex);
-                            ok = false;
-                        }
-                    } else {
-                        setManager(new StandardManager());
-                    }
+                if (contextManager != null) {
+                	setManager(contextManager);
                 }
                 
                 // Start manager



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


Mime
View raw message