remm 2002/11/13 06:35:55 Modified: catalina/src/share/org/apache/catalina/core StandardDefaultContext.java Log: - Port patch. - Reload is the equivalent of stop/start for naming purposes. - Fixes bug 13364, while still doing a refresh of the naming context (which is needed as it might contain instances loaded by the old classloader). Revision Changes Path 1.3 +22 -16 jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java Index: StandardDefaultContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- StandardDefaultContext.java 20 Sep 2002 21:22:31 -0000 1.2 +++ StandardDefaultContext.java 13 Nov 2002 14:35:55 -0000 1.3 @@ -1240,7 +1240,24 @@ return; } - if (event.getType().equals(Lifecycle.AFTER_START_EVENT)) { + if ((event.getType().equals(Lifecycle.BEFORE_STOP_EVENT)) + || (event.getType().equals(Context.RELOAD_EVENT))) { + + // Remove context + contexts.remove(context); + + // Remove listener from the NamingResource listener list + namingResources.removePropertyChangeListener(listener); + + // Remove listener from lifecycle listeners + if (!(event.getType().equals(Context.RELOAD_EVENT))) { + context.removeLifecycleListener(this); + } + + } + + if ((event.getType().equals(Lifecycle.AFTER_START_EVENT)) + || (event.getType().equals(Context.RELOAD_EVENT))) { // Add context contexts.put(context, context); @@ -1290,17 +1307,6 @@ // Add listener to the NamingResources listener list namingResources.addPropertyChangeListener(listener); - - } else if (event.getType().equals(Lifecycle.BEFORE_STOP_EVENT)) { - - // Remove context - contexts.remove(context); - - // Remove listener from the NamingResource listener list - namingResources.removePropertyChangeListener(listener); - - // Remove listener from lifecycle listeners - context.removeLifecycleListener(this); }
-- To unsubscribe, e-mail: <mailto:tomcat-dev-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-dev-help@;jakarta.apache.org>