tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r940292 - /tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
Date Sun, 02 May 2010 18:31:41 GMT
Author: markt
Date: Sun May  2 18:31:41 2010
New Revision: 940292

URL: http://svn.apache.org/viewvc?rev=940292&view=rev
Log:
Make sure Server calls destroy() on subordinate Services

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

Modified: tomcat/trunk/java/org/apache/catalina/core/StandardServer.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/StandardServer.java?rev=940292&r1=940291&r2=940292&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/StandardServer.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/StandardServer.java Sun May  2 18:31:41 2010
@@ -715,7 +715,7 @@ public final class StandardServer extend
     }
     
     @Override
-    protected void destroyInternal() {
+    protected void destroyInternal() throws LifecycleException {
         Registry registry = Registry.getRegistry(null, null);
         
         if (onameStringCache != null) {
@@ -724,6 +724,11 @@ public final class StandardServer extend
         if (onameMBeanFactory != null) {
             registry.unregisterComponent(onameMBeanFactory);
         }
+        
+        // Destroy our defined Services
+        for (int i = 0; i < services.length; i++) {
+            services[i].destroy();
+        }
     }
 
     protected volatile String domain;



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


Mime
View raw message