tomcat-dev mailing list archives

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

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

Modified:
    tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java

Modified: tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
URL: http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java?rev=413538&r1=413537&r2=413538&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
(original)
+++ tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/core/StandardWrapper.java
Sun Jun 11 14:53:07 2006
@@ -1308,10 +1308,6 @@
             }
         }
 
-        ClassLoader oldCtxClassLoader =
-            Thread.currentThread().getContextClassLoader();
-        ClassLoader classLoader = instance.getClass().getClassLoader();
-
         PrintStream out = System.out;
         if (swallowOutput) {
             SystemLogHandler.startCapture();
@@ -1322,7 +1318,6 @@
             instanceSupport.fireInstanceEvent
               (InstanceEvent.BEFORE_DESTROY_EVENT, instance);
 
-            Thread.currentThread().setContextClassLoader(classLoader);
             if( System.getSecurityManager() != null) {
                 SecurityUtil.doAsPrivilege("destroy",
                                            instance);
@@ -1345,8 +1340,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();
@@ -1365,7 +1358,6 @@
 
         if (singleThreadModel && (instancePool != null)) {
             try {
-                Thread.currentThread().setContextClassLoader(classLoader);
                 while (!instancePool.isEmpty()) {
                     if( System.getSecurityManager() != null) {
                         SecurityUtil.doAsPrivilege("destroy",
@@ -1383,10 +1375,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