remm 02/04/13 05:36:34 Modified: catalina/src/share/org/apache/catalina/core StandardContext.java Log: - Changes to the order of initialization and shutdown of the components (the manager mainly). - The ENC is now available during startup and shutdown of the manager (bug 7850). This does not appear to create problems. - Includes the patch for bug 7971 (submitted by Andreas Junghans <Andreas.Junghans at fh-karlsruhe.de>). Revision Changes Path 1.104 +33 -32 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java Index: StandardContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- StandardContext.java 4 Apr 2002 20:30:34 -0000 1.103 +++ StandardContext.java 13 Apr 2002 12:36:34 -0000 1.104 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.103 2002/04/04 20:30:34 craigmcc Exp $ - * $Revision: 1.103 $ - * $Date: 2002/04/04 20:30:34 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardContext.java,v 1.104 2002/04/13 12:36:34 remm Exp $ + * $Revision: 1.104 $ + * $Date: 2002/04/13 12:36:34 $ * * ==================================================================== * @@ -147,7 +147,7 @@ * * @author Craig R. McClanahan * @author Remy Maucherat - * @version $Revision: 1.103 $ $Date: 2002/04/04 20:30:34 $ + * @version $Revision: 1.104 $ $Date: 2002/04/13 12:36:34 $ */ public class StandardContext @@ -2377,6 +2377,15 @@ // Binding thread ClassLoader oldCCL = bindThread(); + // Shut down our session manager + if ((manager != null) && (manager instanceof Lifecycle)) { + try { + ((Lifecycle) manager).stop(); + } catch (LifecycleException e) { + log(sm.getString("standardContext.stoppingManager"), e); + } + } + // Shut down the current version of all active servlets Container children[] = findChildren(); for (int i = 0; i < children.length; i++) { @@ -2392,6 +2401,9 @@ } } + // Shut down application event listeners + listenerStop(); + // Clear all application-originated servlet context attributes if (context != null) context.clearAttributes(); @@ -2399,18 +2411,6 @@ // Shut down filters filterStop(); - // Shut down our session manager - if ((manager != null) && (manager instanceof Lifecycle)) { - try { - ((Lifecycle) manager).stop(); - } catch (LifecycleException e) { - log(sm.getString("standardContext.stoppingManager"), e); - } - } - - // Shut down application event listeners - listenerStop(); - if (isUseNaming()) { // Start namingContextListener.lifecycleEvent @@ -3406,8 +3406,6 @@ // Binding thread oldCCL = bindThread(); - if ((manager != null) && (manager instanceof Lifecycle)) - ((Lifecycle) manager).start(); if ((cluster != null) && (cluster instanceof Lifecycle)) ((Lifecycle) cluster).start(); if ((realm != null) && (realm instanceof Lifecycle)) @@ -3437,6 +3435,9 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); + if ((manager != null) && (manager instanceof Lifecycle)) + ((Lifecycle) manager).start(); + } finally { // Unbinding thread unbindThread(oldCCL); @@ -3454,6 +3455,13 @@ // Binding thread oldCCL = bindThread(); + // Create context attributes that will be required + if (ok) { + if (debug >= 1) + log("Posting standard context attributes"); + postWelcomeFiles(); + } + // Configure and call application event listeners and filters if (ok) { if (!listenerStart()) @@ -3464,13 +3472,6 @@ ok = false; } - // Create context attributes that will be required - if (ok) { - if (debug >= 1) - log("Posting standard context attributes"); - postWelcomeFiles(); - } - // Load and initialize all "load on startup" servlets if (ok) loadOnStartup(findChildren()); @@ -3523,6 +3524,10 @@ // Finalize our character set mapper setCharsetMapper(null); + if ((manager != null) && (manager instanceof Lifecycle)) { + ((Lifecycle) manager).stop(); + } + // Normal container shutdown processing if (debug >= 1) log("Processing standard container shutdown"); @@ -3551,6 +3556,9 @@ ((Lifecycle) mappers[(mappers.length-1)-i]).stop(); } + // Stop our application listeners + listenerStop(); + // Stop our subordinate components, if any if (resources != null) { if (resources instanceof Lifecycle) { @@ -3580,13 +3588,6 @@ if ((cluster != null) && (cluster instanceof Lifecycle)) { ((Lifecycle) cluster).stop(); } - if ((manager != null) && (manager instanceof Lifecycle)) { - ((Lifecycle) manager).stop(); - } - - // Stop our application listeners - listenerStop(); - if ((logger != null) && (logger instanceof Lifecycle)) { ((Lifecycle) logger).stop(); }
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>