camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [4/4] git commit: Added more logging when listener container stops and whether shared connections is stopped as well.
Date Wed, 06 Nov 2013 09:40:29 GMT
Added more logging when listener container stops and whether shared connections is stopped
as well.


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

Branch: refs/heads/master
Commit: 0fea7daf7cbd527737ea22db9cb6e4a8fb4846ef
Parents: 71758b5
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Nov 5 17:37:13 2013 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Wed Nov 6 08:57:04 2013 +0100

----------------------------------------------------------------------
 .../jms/DefaultJmsMessageListenerContainer.java | 30 +++++++++++++++++++-
 1 file changed, 29 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/0fea7daf/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultJmsMessageListenerContainer.java
----------------------------------------------------------------------
diff --git a/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultJmsMessageListenerContainer.java
b/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultJmsMessageListenerContainer.java
index ca89f0c..793bb75 100644
--- a/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultJmsMessageListenerContainer.java
+++ b/components/camel-jms/src/main/java/org/apache/camel/component/jms/DefaultJmsMessageListenerContainer.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.jms;
 import org.apache.camel.util.concurrent.CamelThreadFactory;
 import org.springframework.core.task.SimpleAsyncTaskExecutor;
 import org.springframework.core.task.TaskExecutor;
+import org.springframework.jms.JmsException;
 import org.springframework.jms.listener.DefaultMessageListenerContainer;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 
@@ -80,5 +81,32 @@ public class DefaultJmsMessageListenerContainer extends DefaultMessageListenerCo
             return answer;
         }
     }
-    
+
+    @Override
+    public void stop() throws JmsException {
+        if (logger.isDebugEnabled()) {
+            logger.debug("Stopping listenerContainer: " + this + " with cacheLevel: " + getCacheLevel()
+                    + " and sharedConnectionEnabled: " + sharedConnectionEnabled());
+        }
+        super.stop();
+    }
+
+    @Override
+    public void destroy() {
+        if (logger.isDebugEnabled()) {
+            logger.debug("Destroying listenerContainer: " + this + " with cacheLevel: " +
getCacheLevel()
+                    + " and sharedConnectionEnabled: " + sharedConnectionEnabled());
+        }
+        super.destroy();
+    }
+
+    @Override
+    protected void stopSharedConnection() {
+        if (logger.isDebugEnabled()) {
+            if (sharedConnectionEnabled()) {
+                logger.debug("Stopping shared connection on listenerContainer: " + this);
+            }
+        }
+        super.stopSharedConnection();
+    }
 }


Mime
View raw message