You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2002/11/13 15:16:24 UTC
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardDefaultContext.java
remm 2002/11/13 06:16:24
Modified: catalina/src/share/org/apache/catalina/core
StandardDefaultContext.java
Log:
- 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.9 +22 -16 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java
Index: StandardDefaultContext.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardDefaultContext.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- StandardDefaultContext.java 19 Sep 2002 22:55:48 -0000 1.8
+++ StandardDefaultContext.java 13 Nov 2002 14:16:24 -0000 1.9
@@ -1268,7 +1268,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);
@@ -1318,17 +1335,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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>