Port fix for bug 39769. Remove the classloader switching from unload. It was removed...
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 11 Jun 2006 21:53:53 +0000 (21:53 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 11 Jun 2006 21:53:53 +0000 (21:53 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@413540 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/core/StandardWrapper.java

index c9e9a78..50cb199 100644 (file)
@@ -1344,10 +1344,6 @@ public class StandardWrapper
             }\r
         }\r
 \r
-        ClassLoader oldCtxClassLoader =\r
-            Thread.currentThread().getContextClassLoader();\r
-        ClassLoader classLoader = instance.getClass().getClassLoader();\r
-\r
         PrintStream out = System.out;\r
         if (swallowOutput) {\r
             SystemLogHandler.startCapture();\r
@@ -1358,7 +1354,6 @@ public class StandardWrapper
             instanceSupport.fireInstanceEvent\r
               (InstanceEvent.BEFORE_DESTROY_EVENT, instance);\r
 \r
-            Thread.currentThread().setContextClassLoader(classLoader);\r
             if( System.getSecurityManager() != null) {\r
                 SecurityUtil.doAsPrivilege("destroy",\r
                                            instance);\r
@@ -1387,8 +1382,6 @@ public class StandardWrapper
                 (sm.getString("standardWrapper.destroyException", getName()),\r
                  t);\r
         } finally {\r
-            // restore the context ClassLoader\r
-            Thread.currentThread().setContextClassLoader(oldCtxClassLoader);\r
             // Write captured output\r
             if (swallowOutput) {\r
                 String log = SystemLogHandler.stopCapture();\r
@@ -1407,7 +1400,6 @@ public class StandardWrapper
 \r
         if (singleThreadModel && (instancePool != null)) {\r
             try {\r
-                Thread.currentThread().setContextClassLoader(classLoader);\r
                 while (!instancePool.isEmpty()) {\r
                     Servlet s = (Servlet) instancePool.pop();\r
                     if (System.getSecurityManager() != null) {\r
@@ -1429,10 +1421,6 @@ public class StandardWrapper
                 throw new ServletException\r
                     (sm.getString("standardWrapper.destroyException",\r
                                   getName()), t);\r
-            } finally {\r
-                // restore the context ClassLoader\r
-                Thread.currentThread().setContextClassLoader\r
-                    (oldCtxClassLoader);\r
             }\r
             instancePool = null;\r
             nInstances = 0;\r