remm        2005/02/09 04:20:41

  Modified:    catalina/src/share/org/apache/catalina/core
                        StandardContext.java
  Log:
  - Fix 33463: remove attributes after context destroy.
  - Fix typo in two event strings.
  - Remove dead code.
  - One small indentation fix.
  
  Revision  Changes    Path
  1.162     +15 -49    
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java
  
  Index: StandardContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/StandardContext.java,v
  retrieving revision 1.161
  retrieving revision 1.162
  diff -u -r1.161 -r1.162
  --- StandardContext.java      6 Feb 2005 10:39:32 -0000       1.161
  +++ StandardContext.java      9 Feb 2005 12:20:40 -0000       1.162
  @@ -3698,17 +3698,19 @@
               try {
                   fireContainerEvent("beforeContextDestroyed", listener);
                   listener.contextDestroyed(event);
  -                fireContainerEvent("beforeContextDestroyed", listener);
  +                fireContainerEvent("afterContextDestroyed", listener);
               } catch (Throwable t) {
  -                fireContainerEvent("beforeContextDestroyed", listener);
  +                fireContainerEvent("afterContextDestroyed", listener);
                   getServletContext().log
                       (sm.getString("standardContext.listenerStop",
                                     listeners[j].getClass().getName()), t);
                   ok = false;
               }
           }
  +
           setApplicationEventListeners(null);
           setApplicationLifecycleListeners(null);
  +
           return (ok);
   
       }
  @@ -4032,12 +4034,12 @@
                   // if any
                   if (pipeline instanceof Lifecycle) {
                       ((Lifecycle) pipeline).start();
  -             }
  -
  +                }
  +                
                   if(getProcessTlds()) {
  -                 processTlds();
  -             }
  -
  +                    processTlds();
  +                }
  +                
                   // Notify our interested LifecycleListeners
                   lifecycle.fireLifecycleEvent(START_EVENT, null);
   
  @@ -4204,43 +4206,7 @@
           }
       }
   
  -    /**
  -     * Stop this Context component. Experimental, please ignore.
  -     *
  -     * @exception LifecycleException if a shutdown error occurs
  -     */
  -    public synchronized void stopNew() throws LifecycleException {
  -        // Mark this application as unavailable while we shut down
  -        setAvailable(false);
  -
  -        // Binding thread
  -        ClassLoader oldCCL = bindThread();
  -
  -        try {
  -            // Stop our filters
  -            filterStop();
  -            
  -            // Finalize our character set mapper
  -            setCharsetMapper(null);
  -            
  -            // Stop our application listeners
  -            listenerStop();
  -            
  -            // Stop resources
  -            resourcesStop();
  -            
  -            super.stop();
  -        } finally {
  -            
  -            // Unbinding thread
  -            unbindThread(oldCCL);
  -            
  -        }
  -        
  -        // Reset application context
  -        context = null;
  -    }
  -
  +    
       /**
        * Stop this Context component.
        *
  @@ -4283,10 +4249,6 @@
               ((Lifecycle) manager).stop();
           }
   
  -        // Clear all application-originated servlet context attributes
  -        if (context != null)
  -            context.clearAttributes();
  -
           // Finalize our character set mapper
           setCharsetMapper(null);
   
  @@ -4314,6 +4276,10 @@
               // Stop our application listeners
               listenerStop();
   
  +            // Clear all application-originated servlet context attributes
  +            if (context != null)
  +                context.clearAttributes();
  +
               // Stop resources
               resourcesStop();
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to