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-7243] USe correct queue for replyToDestination
Date Mon, 20 Feb 2017 16:29:54 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c0e79369f -> 47c00e2fe


[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/47c00e2f
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/47c00e2f
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/47c00e2f

Branch: refs/heads/master
Commit: 47c00e2fe100bdf7c12150093067ed58a09c5161
Parents: c0e7936
Author: Christian Schneider <chris@die-schneider.net>
Authored: Mon Feb 20 17:29:37 2017 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Mon Feb 20 17:29:49 2017 +0100

----------------------------------------------------------------------
 .../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/47c00e2f/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 b1aa7c3..e23dc35 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
@@ -206,12 +206,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);
@@ -219,8 +220,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/47c00e2f/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 5702ce9..e8fba27 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
@@ -484,7 +484,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