tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r413540 - /tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
Date Sun, 11 Jun 2006 21:53:54 GMT
Author: markt
Date: Sun Jun 11 14:53:53 2006
New Revision: 413540

URL: http://svn.apache.org/viewvc?rev=413540&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/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java

Modified: tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java?rev=413540&r1=413539&r2=413540&view=diff
==============================================================================
--- tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java (original)
+++ tomcat/tc6.0.x/trunk/java/org/apache/catalina/core/StandardWrapper.java Sun Jun 11 14:53:53
2006
@@ -1344,10 +1344,6 @@
             }
         }
 
-        ClassLoader oldCtxClassLoader =
-            Thread.currentThread().getContextClassLoader();
-        ClassLoader classLoader = instance.getClass().getClassLoader();
-
         PrintStream out = System.out;
         if (swallowOutput) {
             SystemLogHandler.startCapture();
@@ -1358,7 +1354,6 @@
             instanceSupport.fireInstanceEvent
               (InstanceEvent.BEFORE_DESTROY_EVENT, instance);
 
-            Thread.currentThread().setContextClassLoader(classLoader);
             if( System.getSecurityManager() != null) {
                 SecurityUtil.doAsPrivilege("destroy",
                                            instance);
@@ -1387,8 +1382,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();
@@ -1407,7 +1400,6 @@
 
         if (singleThreadModel && (instancePool != null)) {
             try {
-                Thread.currentThread().setContextClassLoader(classLoader);
                 while (!instancePool.isEmpty()) {
                     Servlet s = (Servlet) instancePool.pop();
                     if (System.getSecurityManager() != null) {
@@ -1429,10 +1421,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