jfarcand    2005/09/27 16:42:53

  Modified:    catalina/src/share/org/apache/catalina/loader
                        WebappClassLoader.java
  Log:
  Port fix from SJSAS.
  
  Patch submitted by: Jan Luehe
  
  Revision  Changes    Path
  1.51      +16 -3     
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java
  
  Index: WebappClassLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/loader/WebappClassLoader.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- WebappClassLoader.java    8 Sep 2005 15:00:54 -0000       1.50
  +++ WebappClassLoader.java    27 Sep 2005 23:42:53 -0000      1.51
  @@ -1470,6 +1470,21 @@
        */
       public void stop() throws LifecycleException {
   
  +        /*
  +         * Clear the IntrospectionUtils cache.
  +         *
  +         * Implementation note:
  +         * Any reference to IntrospectionUtils which may cause the static
  +         * initalizer of that class to be invoked must occur prior to setting
  +         * the started flag to FALSE, because the static initializer of
  +         * IntrospectionUtils makes a call to
  +         * org.apache.commons.logging.LogFactory.getLog(), which ultimately
  +         * calls the loadClass() method of the thread context classloader,
  +         * which is the same as this classloader, whose impl throws a
  +         * ThreadDeath if the started flag has been set to FALSE.
  +         */
  +        IntrospectionUtils.clear();
  +
           started = false;
   
           int length = files.length;
  @@ -1515,8 +1530,6 @@
           org.apache.commons.logging.LogFactory.release(this);
           // Clear the classloader reference in the VM's bean introspector
           java.beans.Introspector.flushCaches();
  -        // Clear the IntrospectionUtils cache
  -        IntrospectionUtils.clear();
   
       }
   
  
  
  

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

Reply via email to