Hi, during work on session serialization my colleagues run into a problem with the startup order of the session manager vs listeners/filters.
During startup the session manager is started before the listeners and filters. This implies that objects that depend on parts of the application can not be properly deserialized. (Apparently, a re-write to remove such dependencies is not feasible in our case.) Further this behaviour is inconsistent with the reload behaviour, which was previously changed due to http://issues.apache.org/bugzilla/show_bug.cgi?id=3733. We have patched this behaviour (see attachment) to start listeners/filters immediately _befor_ the session manager. This patch solves our problem and does not seem to cause any new issues with our application. However, due to the triviality of the patch, we have not made a thorough examination of the workings of o.a.c.core.StandardContext. Also, the patch is focused on one specific issue. It does not (unless by coincidence) ensure consistency in the reload/start behaviours. The patch is against 4.1.16, since 4.1.17 was released after the patch was written. Sincerely, Michael Eriksson
--- StandardContext.java 2002-12-16 11:31:45.000000000 +0100 +++ +jakarta-tomcat-4.1.16-src/catalina/src/share/org/apache/catalina/core/StandardContext.java + 2002-12-16 11:33:47.000000000 +0100 @@ -3566,15 +3566,7 @@ // Notify our interested LifecycleListeners lifecycle.fireLifecycleEvent(START_EVENT, null); - // Configure and call application event listeners and filters - if (!listenerStart()) - ok = false; - if (ok) { - if (!filterStart()) - ok = false; - } - - if (ok && (manager != null) && (manager instanceof Lifecycle)) + if ((manager != null) && (manager instanceof Lifecycle)) ((Lifecycle) manager).start(); } finally { @@ -3601,6 +3593,16 @@ postWelcomeFiles(); } + // Configure and call application event listeners and filters + if (ok) { + if (!listenerStart()) + ok = false; + } + if (ok) { + if (!filterStart()) + ok = false; + } + // Load and initialize all "load on startup" servlets if (ok) loadOnStartup(findChildren());
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>