tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1560164 - /tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
Date Tue, 21 Jan 2014 20:14:33 GMT
Author: markt
Date: Tue Jan 21 20:14:33 2014
New Revision: 1560164

URL: http://svn.apache.org/r1560164
Log:
Simplify bind and unbind on stop

Modified:
    tomcat/trunk/java/org/apache/catalina/core/StandardContext.java

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardContext.java?rev=1560164&r1=1560163&r2=1560164&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardContext.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardContext.java Tue Jan 21 20:14:33 2014
@@ -5356,34 +5356,28 @@ public class StandardContext extends Con
         ClassLoader oldCCL = bindThread();
 
         try {
-
             // Stop our child containers, if any
             final Container[] children = findChildren();
 
-            ClassLoader old = bindThread();
-            try {
-                // Stop ContainerBackgroundProcessor thread
-                threadStop();
-
-                for (int i = 0; i < children.length; i++) {
-                    children[i].stop();
-                }
+            // Stop ContainerBackgroundProcessor thread
+            threadStop();
 
-                // Stop our filters
-                filterStop();
+            for (int i = 0; i < children.length; i++) {
+                children[i].stop();
+            }
 
-                Manager manager = getManager();
-                if (manager != null && manager instanceof Lifecycle &&
-                        ((Lifecycle) manager).getState().isAvailable()) {
-                    ((Lifecycle) manager).stop();
-                }
+            // Stop our filters
+            filterStop();
 
-                // Stop our application listeners
-                listenerStop();
-            } finally{
-                unbindThread(old);
+            Manager manager = getManager();
+            if (manager != null && manager instanceof Lifecycle &&
+                    ((Lifecycle) manager).getState().isAvailable()) {
+                ((Lifecycle) manager).stop();
             }
 
+            // Stop our application listeners
+            listenerStop();
+
             // Finalize our character set mapper
             setCharsetMapper(null);
 



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


Mime
View raw message