From d51e6c694baba241144a6eaf938a2b656b3615cd Mon Sep 17 00:00:00 2001 From: fhanik Date: Fri, 6 Oct 2006 21:17:02 +0000 Subject: [PATCH] Must read web.xml before we create the manager, otherwise we don't know if we need a distributable manager or not. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@453769 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/core/StandardContext.java | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/java/org/apache/catalina/core/StandardContext.java b/java/org/apache/catalina/core/StandardContext.java index 3110f2c2c..f4bd9b661 100644 --- a/java/org/apache/catalina/core/StandardContext.java +++ b/java/org/apache/catalina/core/StandardContext.java @@ -4180,25 +4180,6 @@ public class StandardContext 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(); - } - } else if ((getCluster() != null) && distributable) { - //let the cluster know that there is a context that is distributable - //and that it has its own manager - getCluster().registerManager(manager); - } - // Binding thread ClassLoader oldCCL = bindThread(); @@ -4254,6 +4235,25 @@ public class StandardContext // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); + + // 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(); + } + } else if ( (getCluster() != null) && distributable) { + //let the cluster know that there is a context that is distributable + //and that it has its own manager + getCluster().registerManager(manager); + } // Configure default manager if none was specified if (contextManager != null) { -- 2.11.0