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 2008/05/28 22:42:22 UTC
svn commit: r661074 -
/tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
Author: markt
Date: Wed May 28 13:42:22 2008
New Revision: 661074
URL: http://svn.apache.org/viewvc?rev=661074&view=rev
Log:
Additional fix for https://issues.apache.org/bugzilla/show_bug.cgi?id=43683
If the context is reloaded, the classloader will have changed so need to reset it
Modified:
tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java?rev=661074&r1=661073&r2=661074&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContextValve.java Wed May 28 13:42:22 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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org