tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r379183 - in /tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina: core/StandardContext.java startup/ContextConfig.java
Date Mon, 20 Feb 2006 17:45:49 GMT
Author: remm
Date: Mon Feb 20 09:45:48 2006
New Revision: 379183

URL: http://svn.apache.org/viewcvs?rev=379183&view=rev
Log:
- Slightly modify the timing of the manager start (unfortunately, setManager in ContextConfig.java

  causes and immediate start of the manager).

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java?rev=379183&r1=379182&r2=379183&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardContext.java
Mon Feb 20 09:45:48 2006
@@ -81,6 +81,7 @@
 import org.apache.catalina.deploy.SecurityCollection;
 import org.apache.catalina.deploy.SecurityConstraint;
 import org.apache.catalina.loader.WebappLoader;
+import org.apache.catalina.session.StandardManager;
 import org.apache.catalina.startup.ContextConfig;
 import org.apache.catalina.startup.TldConfig;
 import org.apache.catalina.util.CharsetMapper;
@@ -4116,6 +4117,20 @@
                 // Notify our interested LifecycleListeners
                 lifecycle.fireLifecycleEvent(START_EVENT, null);
 
+                // Configure default manager if none was specified
+                if (manager == null) {
+                    if ((cluster != null) && distributable) {
+                        try {
+                            setManager(cluster.createManager(getName()));
+                        } catch (Exception ex) {
+                            log.error("standardContext.clusterFail", ex);
+                            ok = false;
+                        }
+                    } else {
+                        setManager(new StandardManager());
+                    }
+                }
+                
                 // Start manager
                 if ((manager != null) && (manager instanceof Lifecycle)) {
                     ((Lifecycle) getManager()).start();

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewcvs/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java?rev=379183&r1=379182&r2=379183&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/startup/ContextConfig.java
Mon Feb 20 09:45:48 2006
@@ -388,28 +388,6 @@
 
 
     /**
-     * Set up a manager.
-     */
-    protected synchronized void managerConfig() {
-
-        if (context.getManager() == null) {
-            if ((context.getCluster() != null) && context.getDistributable()) {
-                try {
-                    context.setManager(context.getCluster().createManager
-                                       (context.getName()));
-                } catch (Exception ex) {
-                    log.error("contextConfig.clusteringInit", ex);
-                    ok = false;
-                }
-            } else {
-                context.setManager(new StandardManager());
-            }
-        }
-
-    }
-
-
-    /**
      * Set up an Authenticator automatically if required, and one has not
      * already been configured.
      */
@@ -1062,10 +1040,6 @@
         // Configure an authenticator if we need one
         if (ok)
             authenticatorConfig();
-
-        // Configure a manager
-        if (ok)
-            managerConfig();
 
         // Dump the contents of this pipeline if requested
         if ((log.isDebugEnabled()) && (context instanceof ContainerBase)) {



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


Mime
View raw message