camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/4] camel git commit: ZooKeeperProducer does not stop ZooKeeper threads if Camel context ist stopped. Added overloaded doStop() method to shutdown ZooKeeperConnectionManager
Date Wed, 30 Dec 2015 16:05:10 GMT
ZooKeeperProducer does not stop ZooKeeper threads if Camel context ist stopped. Added overloaded
doStop() method to shutdown ZooKeeperConnectionManager


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/3eee448b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3eee448b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3eee448b

Branch: refs/heads/camel-2.16.x
Commit: 3eee448bc384491864a5ea53b206a9a3816077fe
Parents: 5c4f008
Author: Klaus SchroŐąder <klaus.schroeder@next-audience.com>
Authored: Thu Dec 19 14:13:16 2013 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Dec 30 17:04:52 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/component/zookeeper/ZookeeperProducer.java | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/3eee448b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZookeeperProducer.java
----------------------------------------------------------------------
diff --git a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZookeeperProducer.java
b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZookeeperProducer.java
index d147b4f..aaf368b 100644
--- a/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZookeeperProducer.java
+++ b/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/ZookeeperProducer.java
@@ -119,6 +119,15 @@ public class ZookeeperProducer extends DefaultProducer {
         }
     }
 
+    @Override
+    protected void doStop() throws Exception {
+        super.doStop();
+        if (log.isTraceEnabled()) {
+            log.trace(String.format("Shutting down zookeeper producer of '%s'", configuration.getPath()));
+        }
+        zkm.shutdown();
+    }
+
     private void asynchronouslyDeleteNode(ZooKeeper connection, ProductionContext context)
{
         if (log.isDebugEnabled()) {
             log.debug(format("Deleting node '%s', not waiting for confirmation", context.node));


Mime
View raw message