cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf git commit: [CXF-5754] Make sure temp queues are closed
Date Wed, 15 Mar 2017 09:26:02 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 4bfd87f8d -> a911f8cf5


[CXF-5754] Make sure temp queues are closed


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

Branch: refs/heads/master
Commit: a911f8cf5f912e4927269015717dab49bd3148fe
Parents: 4bfd87f
Author: Christian Schneider <chris@die-schneider.net>
Authored: Wed Mar 15 10:25:34 2017 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Wed Mar 15 10:25:34 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/transport/jms/JMSConduit.java  | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a911f8cf/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
index e23dc35..1020398 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
@@ -218,13 +218,16 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender,
Me
                 correlationMap.put(correlationId, exchange);
             }
 
-            if (exchange.isSynchronous()) {
+            if (!exchange.isSynchronous()) {
+                return;
+            }
+
+            try {
                 if (useSyncReceive) {
                     javax.jms.Message replyMessage = JMSUtil.receive(session, replyDestination,
                                                                      correlationId,
                                                                      jmsConfig.getReceiveTimeout(),
                                                                      jmsConfig.isPubSubNoLocal());
-                    correlationMap.remove(correlationId);
                     processReplyMessage(exchange, replyMessage);
                 } else {
                     try {
@@ -238,6 +241,8 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender,
Me
                     }
 
                 }
+            } finally {
+                correlationMap.remove(correlationId);
             }
         }
     }


Mime
View raw message