qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [3/3] qpid-jms git commit: stop the consumers before the executor to help ensure they dont try using it or creating a new one
Date Thu, 04 Dec 2014 17:34:28 GMT
stop the consumers before the executor to help ensure they dont try using it or creating a
new one


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

Branch: refs/heads/master
Commit: 148296143c8fcaf94936b5e1653d27aefe34bee0
Parents: cfbdeab
Author: Robert Gemmell <robbie@apache.org>
Authored: Thu Dec 4 10:42:49 2014 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Thu Dec 4 17:34:07 2014 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/qpid/jms/JmsSession.java        | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/14829614/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java
index 32b3f11..d517d9d 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/JmsSession.java
@@ -807,13 +807,15 @@ public class JmsSession implements Session, QueueSession, TopicSession,
JmsMessa
 
     protected void stop() throws JMSException {
         started.set(false);
+
+        for (JmsMessageConsumer consumer : consumers.values()) {
+            consumer.stop();
+        }
+
         if (executor != null) {
             executor.shutdown();
             executor = null;
         }
-        for (JmsMessageConsumer consumer : consumers.values()) {
-            consumer.stop();
-        }
     }
 
     protected boolean isStarted() {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message