camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [2/4] git commit: CAMEL-7085 ZooKeeperProducer should shutdown the ConnectionManager when it is closed with thanks to Klaus
Date Fri, 20 Dec 2013 11:34:32 GMT
CAMEL-7085 ZooKeeperProducer should shutdown the ConnectionManager when it is closed with thanks
to Klaus


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

Branch: refs/heads/camel-2.12.x
Commit: f421a7069ed4a95a1d64f827925355de3e981fb0
Parents: 5e38717
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Fri Dec 20 19:26:02 2013 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Fri Dec 20 19:33:36 2013 +0800

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


http://git-wip-us.apache.org/repos/asf/camel/blob/f421a706/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 4edc98e..f3e77d9 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
@@ -101,6 +101,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