You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2005/02/13 20:54:49 UTC

cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core StandardContext.java

markt       2005/02/13 11:54:49

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Port Remy's fix for 33463 that was introduced by my (invalid) fix for 32559.
  - Aligned start and reload with respect to attributes
  - Remaining issue (as TC5) is that stop fires events for the welcome files
  
  Revision  Changes    Path
  1.129     +21 -21    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.128
  retrieving revision 1.129
  diff -u -r1.128 -r1.129
  --- StandardContext.java	16 Jan 2005 18:06:28 -0000	1.128
  +++ StandardContext.java	13 Feb 2005 19:54:49 -0000	1.129
  @@ -2464,13 +2464,6 @@
           // Shut down filters
           filterStop();
   
  -        // Clear all application-originated servlet context attributes
  -        if (context != null)
  -            context.clearAttributes();
  -
  -        // Shut down application event listeners
  -        listenerStop();
  -
           // Shut down our session manager
           if ((manager != null) && (manager instanceof Lifecycle)) {
               try {
  @@ -2495,6 +2488,13 @@
               }
           }
   
  +        // Shut down application event listeners
  +        listenerStop();
  +
  +        // Clear all application-originated servlet context attributes
  +        if (context != null)
  +            context.clearAttributes();
  +
           if (isUseNaming()) {
               // Stop
               namingContextListener.lifecycleEvent
  @@ -2540,6 +2540,10 @@
           // Binding thread
           oldCCL = bindThread();
   
  +        // Restore the "Welcome Files" and "Resources" context attributes
  +        postResources();
  +        postWelcomeFiles();
  +
           // Restart our application event listeners and filters
           if (ok) {
               if (!listenerStart()) {
  @@ -2554,10 +2558,6 @@
               }
           }
   
  -        // Restore the "Welcome Files" and "Resources" context attributes
  -        postResources();
  -        postWelcomeFiles();
  -
           // Restart our currently defined servlets
           for (int i = 0; i < children.length; i++) {
               if (!ok)
  @@ -3319,9 +3319,9 @@
               try {
                   fireContainerEvent("beforeContextDestroyed", listener);
                   listener.contextDestroyed(event);
  -                fireContainerEvent("beforeContextDestroyed", listener);
  +                fireContainerEvent("afterContextDestroyed", listener);
               } catch (Throwable t) {
  -                fireContainerEvent("beforeContextDestroyed", listener);
  +                fireContainerEvent("afterContextDestroyed", listener);
                   log(sm.getString("standardContext.listenerStop",
                                    listeners[j].getClass().getName()), t);
                   ok = false;
  @@ -3695,13 +3695,6 @@
           // Stop our filters
           filterStop();
   
  -        // Clear all application-originated servlet context attributes
  -        if (context != null)
  -            context.clearAttributes();
  -
  -        // Stop our application listeners
  -        listenerStop();
  -
           // Finalize our character set mapper
           setCharsetMapper(null);
   
  @@ -3730,6 +3723,13 @@
                       ((Lifecycle) children[i]).stop();
               }
   
  +            // Stop our application listeners
  +            listenerStop();
  +
  +            // Clear all application-originated servlet context attributes
  +            if (context != null)
  +                context.clearAttributes();
  +
               // Stop our Mappers, if any
               Mapper mappers[] = findMappers();
               for (int i = 0; i < mappers.length; i++) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org