Author: remy.maucherat(a)jboss.com
Date: 2008-05-30 12:03:08 -0400 (Fri, 30 May 2008)
New Revision: 651
Modified:
trunk/java/org/apache/catalina/core/StandardContextValve.java
Log:
- An additional reloading fix.
Modified: trunk/java/org/apache/catalina/core/StandardContextValve.java
===================================================================
--- trunk/java/org/apache/catalina/core/StandardContextValve.java 2008-05-30 15:28:30 UTC
(rev 650)
+++ trunk/java/org/apache/catalina/core/StandardContextValve.java 2008-05-30 16:03:08 UTC
(rev 651)
@@ -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) {
Show replies by date