luehe       2005/03/24 16:55:33

  Modified:    jasper2/src/share/org/apache/jasper JspC.java
  Log:
  Moved the release (from LogFactory) of "loader" from the finally
  clause of processFile() to the finally clause of execute(), because
  the precompilation of different JSPs may trigger different jasper
  classes to be resolved and initialized, so after removing "loader"
  from LogFactory after one execution of processFile(), a subsequent
  execution of processFile() may add it back in (and later remove it).
  
  Releasing (from LogFactory) "loader" in the finally of execute()
  causes "loader" to be added to, and released from LogFactory once only.
  
  Revision  Changes    Path
  1.94      +4 -3      
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.93
  retrieving revision 1.94
  diff -u -r1.93 -r1.94
  --- JspC.java 24 Mar 2005 18:30:40 -0000      1.93
  +++ JspC.java 25 Mar 2005 00:55:33 -0000      1.94
  @@ -882,9 +882,6 @@
               }
               throw new JasperException(e);
           } finally {
  -            if (loader != null) {
  -                LogFactory.release(loader);
  -            }
               if(originalClassLoader != null) {
                   
Thread.currentThread().setContextClassLoader(originalClassLoader);
               }
  @@ -1013,6 +1010,10 @@
                   rootCause.printStackTrace();
               }
               throw je;
  +        } finally {
  +            if (loader != null) {
  +                LogFactory.release(loader);
  +            }
           }
       }
   
  
  
  

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

Reply via email to