cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1518692 - /cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Date Thu, 29 Aug 2013 16:27:48 GMT
Author: dkulp
Date: Thu Aug 29 16:27:47 2013
New Revision: 1518692

URL: http://svn.apache.org/r1518692
Log:
[CXF-5242] If using a topic for reply destination, leverage the Async setup to make sure a
listener is setup ahead of time.

Modified:
    cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java

Modified: cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?rev=1518692&r1=1518691&r2=1518692&view=diff
==============================================================================
--- cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
(original)
+++ cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java
Thu Aug 29 16:27:47 2013
@@ -189,7 +189,9 @@ public class JMSConduit extends Abstract
         Destination replyToDestination = null;
         if (!exchange.isOneWay() || !jmsConfig.isEnforceSpec() && isSetReplyTo(outMessage)
             && replyTo != null) {
-            if (exchange.isSynchronous() || exchange.isOneWay()) {
+            if (!jmsConfig.isReplyPubSubDomain()
+                && (exchange.isSynchronous() 
+                    || exchange.isOneWay())) {
                 replyToDestination = JMSFactory.resolveOrCreateDestination(jmsTemplate, replyTo,
                                                                            jmsConfig.isReplyPubSubDomain());
             } else {
@@ -210,14 +212,14 @@ public class JMSConduit extends Abstract
                 String messageType = jmsConfig.getMessageType();
                 Destination destination = rtd;
                 String replyToAddress = jmsConfig.getReplyToDestination();
-                if (replyToAddress != null) {
+                if (rtd == null && replyToAddress != null) {
                     destination = JMSFactory.resolveOrCreateDestination(jmsTemplate, replyToAddress,
                                                                         jmsConfig.isPubSubDomain());
                 }
                 jmsMessage = JMSUtils.buildJMSMessageFromCXFMessage(jmsConfig, outMessage,
request,
                                                                     messageType, session,
destination,
                                                                     cid);
-                if (!exchange.isSynchronous() && !exchange.isOneWay()) {
+                if ((jmsConfig.isReplyPubSubDomain() || !exchange.isSynchronous()) &&
!exchange.isOneWay()) {
                     correlationMap.put(cid, exchange);
                 }
                 LOG.log(Level.FINE, "client sending request: ", jmsMessage);
@@ -249,7 +251,7 @@ public class JMSConduit extends Abstract
                 headers.setJMSMessageID(messageCreator.getMessageID());
 
                 final String messageSelector = "JMSCorrelationID = '" + correlationId + "'";
-                if (exchange.isSynchronous()) {
+                if (exchange.isSynchronous() && !jmsConfig.isReplyPubSubDomain())
{
                     javax.jms.Message replyMessage = jmsTemplate.receiveSelected(replyToDestination,
                                                                                  messageSelector);
                     if (replyMessage == null) {
@@ -283,6 +285,7 @@ public class JMSConduit extends Abstract
             if (userCID != null) {
                 correlationId = userCID;
             } else if (!jmsConfig.isSetConduitSelectorPrefix()
+                       && !jmsConfig.isReplyPubSubDomain()
                        && (exchange.isSynchronous() || exchange.isOneWay())
                        && (!jmsConfig.isSetUseConduitIdSelector() 
                            || !jmsConfig.isUseConduitIdSelector())) {



Mime
View raw message