camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jans...@apache.org
Subject svn commit: r1393406 - /camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
Date Wed, 03 Oct 2012 11:01:02 GMT
Author: janstey
Date: Wed Oct  3 11:01:02 2012
New Revision: 1393406

URL: http://svn.apache.org/viewvc?rev=1393406&view=rev
Log:
CAMEL-5677 - Stopping a seda consumer leaves a thread running

Modified:
    camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java

Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java?rev=1393406&r1=1393405&r2=1393406&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
(original)
+++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/component/seda/SedaConsumer.java
Wed Oct  3 11:01:02 2012
@@ -300,6 +300,13 @@ public class SedaConsumer extends Servic
 
     protected void doStop() throws Exception {
         endpoint.onStopped(this);
+        
+        // need to shutdown executor here as well or each time this endpoint is 
+        // started a new thread will be created
+        if (executor != null) {
+            endpoint.getCamelContext().getExecutorServiceManager().shutdownNow(executor);
+            executor = null;
+        }
     }
 
     @Override



Mime
View raw message