tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r413539 - /tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Date Sun, 11 Jun 2006 21:53:39 GMT
Author: markt
Date: Sun Jun 11 14:53:39 2006
New Revision: 413539

URL: http://svn.apache.org/viewvc?rev=413539&view=rev
Log:
Port fix for bug 39769. Remove the classloader switching from unload. It was removed from
load some time ago. Patch provided by David Gagnon.

Modified:
    tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java

Modified: tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java?rev=413539&r1=413538&r2=413539&view=diff
==============================================================================
--- tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
(original)
+++ tomcat/container/branches/tc4.1.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Sun Jun 11 14:53:39 2006
@@ -1051,10 +1051,6 @@
             }
         }
 
-        ClassLoader oldCtxClassLoader =
-            Thread.currentThread().getContextClassLoader();
-        ClassLoader classLoader = instance.getClass().getClassLoader();
-
         PrintStream out = System.out;
         if (swallowOutput) {
             SystemLogHandler.startCapture();
@@ -1064,7 +1060,6 @@
         try {
             instanceSupport.fireInstanceEvent
               (InstanceEvent.BEFORE_DESTROY_EVENT, instance);
-            Thread.currentThread().setContextClassLoader(classLoader);
             instance.destroy();
             instanceSupport.fireInstanceEvent
               (InstanceEvent.AFTER_DESTROY_EVENT, instance);
@@ -1080,8 +1075,6 @@
                 (sm.getString("standardWrapper.destroyException", getName()),
                  t);
         } finally {
-            // restore the context ClassLoader
-            Thread.currentThread().setContextClassLoader(oldCtxClassLoader);
             // Write captured output
             if (swallowOutput) {
                 String log = SystemLogHandler.stopCapture();
@@ -1100,7 +1093,6 @@
 
         if (singleThreadModel && (instancePool != null)) {
             try {
-                Thread.currentThread().setContextClassLoader(classLoader);
                 while (!instancePool.isEmpty()) {
                     ((Servlet) instancePool.pop()).destroy();
                 }
@@ -1112,10 +1104,6 @@
                 throw new ServletException
                     (sm.getString("standardWrapper.destroyException", 
                                   getName()), t);
-            } finally {
-                // restore the context ClassLoader
-                Thread.currentThread().setContextClassLoader
-                    (oldCtxClassLoader);
             }
             instancePool = null;
             nInstances = 0;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message