Author: markt Date: Sun Jun 8 04:45:24 2008 New Revision: 664486 URL: http://svn.apache.org/viewvc?rev=664486&view=rev Log: Further fix for 43683 - use the new class loader after a context reload
Modified: tomcat/tc6.0.x/trunk/STATUS.txt tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java Modified: tomcat/tc6.0.x/trunk/STATUS.txt URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/STATUS.txt?rev=664486&r1=664485&r2=664486&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/STATUS.txt (original) +++ tomcat/tc6.0.x/trunk/STATUS.txt Sun Jun 8 04:45:24 2008 @@ -81,13 +81,6 @@ +1: remm, jfclere -1: -* Further fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=43683 - Reloaded context has new classloader so the context classloader needs to - be reset - http://svn.apache.org/viewvc?rev=661074&view=rev - +1: markt, remm, pero - -1: - * Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=45101 Format header dates obtained from DirContextURLConnection as per HTTP spec Patch provided by Chris Hubick Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java?rev=664486&r1=664485&r2=664486&view=diff ============================================================================== --- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java (original) +++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardContextValve.java Sun Jun 8 04:45:24 2008 @@ -126,7 +126,9 @@ } // Wait if we are reloading + boolean reloaded = false; while (context.getPaused()) { + reloaded = true; try { Thread.sleep(1000); } catch (InterruptedException e) { @@ -134,6 +136,15 @@ } } + // Reloading will have stopped the old webappclassloader and + // created a new one + if (reloaded && + context.getLoader() != null && + context.getLoader().getClassLoader() != null) { + Thread.currentThread().setContextClassLoader( + context.getLoader().getClassLoader()); + } + // Select the Wrapper to be used for this Request Wrapper wrapper = request.getWrapper(); if (wrapper == null) { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]