cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [01/15] cxf git commit: [CXF-7243] USe correct queue for replyToDestination
Date Tue, 07 Mar 2017 20:03:03 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c4901706c -> d5b594749


[CXF-7243] USe correct queue for replyToDestination


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

Branch: refs/heads/3.1.x-fixes
Commit: 40356fc6b033def4adf817453a483939a249e85d
Parents: c490170
Author: Christian Schneider <chris@die-schneider.net>
Authored: Mon Feb 20 17:29:37 2017 +0100
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Mar 7 13:54:51 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/cxf/transport/jms/JMSConduit.java | 14 +++++++-------
 .../apache/cxf/transport/jms/JMSConfiguration.java    |  5 ++++-
 2 files changed, 11 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/40356fc6/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 dbcec32..d711cd7 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
@@ -204,12 +204,13 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender,
Me
         
         // Synchronize on exchange early to make sure we do not miss the notify 
         synchronized (exchange) {
-            Destination replyToDestination = jmsConfig
-                .getReplyToDestination(session, headers.getJMSReplyTo());
-            String jmsMessageID = sendMessage(request, outMessage, replyToDestination, correlationId,
closer,
-                                              session);
+            String replyTo = headers.getJMSReplyTo();
+            String jmsMessageID = sendMessage(request, outMessage,
+                                              jmsConfig.getReplyToDestination(session, replyTo),
+                                              correlationId, closer, session);
+            Destination replyDestination = jmsConfig.getReplyDestination(session, replyTo);
             boolean useSyncReceive = ((correlationId == null || userCID != null) &&
!jmsConfig.isPubSubDomain())
-                || (!replyToDestination.equals(staticReplyDestination) && headers.getJMSReplyTo()
!= null);
+                || !replyDestination.equals(staticReplyDestination);
             if (correlationId == null) {
                 correlationId = jmsMessageID;
                 correlationMap.put(correlationId, exchange);
@@ -217,8 +218,7 @@ public class JMSConduit extends AbstractConduit implements JMSExchangeSender,
Me
 
             if (exchange.isSynchronous()) {
                 if (useSyncReceive) {
-                    // TODO Not sure if replyToDestination is correct here
-                    javax.jms.Message replyMessage = JMSUtil.receive(session, replyToDestination,
+                    javax.jms.Message replyMessage = JMSUtil.receive(session, replyDestination,
                                                                      correlationId,
                                                                      jmsConfig.getReceiveTimeout(),
                                                                      jmsConfig.isPubSubNoLocal());

http://git-wip-us.apache.org/repos/asf/cxf/blob/40356fc6/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
----------------------------------------------------------------------
diff --git a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
index 46a0d95..6269da6 100644
--- a/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
+++ b/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConfiguration.java
@@ -461,7 +461,10 @@ public class JMSConfiguration {
     }
 
     public Destination getReplyDestination(Session session, String replyToName) throws JMSException
{
-        return destinationResolver.resolveDestinationName(session, replyToName, replyPubSubDomain);
+        if (replyToName != null) {
+            return destinationResolver.resolveDestinationName(session, replyToName, replyPubSubDomain);
+        }
+        return getReplyDestination(session);
     }
 
     public TransactionManager getTransactionManager() {


Mime
View raw message