servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r1227242 - in /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework: AutoDeploymentService.java EndpointRegistry.java Registry.java
Date Wed, 04 Jan 2012 18:02:28 GMT
Author: janstey
Date: Wed Jan  4 18:02:28 2012
New Revision: 1227242

URL: http://svn.apache.org/viewvc?rev=1227242&view=rev
Log:
SM-2142 - Fix memory leak when deploying ServiceMix as WAR in Tomcat.

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java?rev=1227242&r1=1227241&r2=1227242&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/AutoDeploymentService.java
Wed Jan  4 18:02:28 2012
@@ -166,6 +166,9 @@ public class AutoDeploymentService exten
             if (timerTask != null) {
                 timerTask.cancel();
             }
+            if (statsTimer != null) {
+                statsTimer.cancel();
+            }
         }
     }
 

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java?rev=1227242&r1=1227241&r2=1227242&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
Wed Jan  4 18:02:28 2012
@@ -24,7 +24,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executor;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 
 import javax.jbi.JBIException;
@@ -67,7 +67,7 @@ public class EndpointRegistry {
     
     private List<EndpointProcessor> endpointProcessors;
     
-    private Executor executor = Executors.newSingleThreadExecutor();
+    private ExecutorService executor = Executors.newSingleThreadExecutor();
     
     /**
      * Constructor
@@ -565,4 +565,7 @@ public class EndpointRegistry {
         });
     }
 
+    public void shutDown() {
+        executor.shutdown();
+    }
 }

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java?rev=1227242&r1=1227241&r2=1227242&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/Registry.java
Wed Jan  4 18:02:28 2012
@@ -151,6 +151,7 @@ public class Registry extends BaseSystem
     public void shutDown() throws JBIException {
         serviceAssemblyRegistry.shutDown();
         componentRegistry.shutDown();
+        endpointRegistry.shutDown();
         super.shutDown();
         container.getManagementContext().unregisterMBean(this);
         executor.shutdown();



Mime
View raw message