Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 15C9A10DED for ; Thu, 29 Aug 2013 16:49:49 +0000 (UTC) Received: (qmail 70228 invoked by uid 500); 29 Aug 2013 16:49:48 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 70171 invoked by uid 500); 29 Aug 2013 16:49:48 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 70164 invoked by uid 99); 29 Aug 2013 16:49:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 16:49:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Aug 2013 16:49:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7953F2388999; Thu, 29 Aug 2013 16:49:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1518705 - /cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java Date: Thu, 29 Aug 2013 16:49:27 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130829164927.7953F2388999@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Thu Aug 29 16:49:27 2013 New Revision: 1518705 URL: http://svn.apache.org/r1518705 Log: Merged revisions 1518692 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1518692 | dkulp | 2013-08-29 12:27:47 -0400 (Thu, 29 Aug 2013) | 2 lines [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/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java Modified: cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java?rev=1518705&r1=1518704&r2=1518705&view=diff ============================================================================== --- cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java (original) +++ cxf/branches/2.7.x-fixes/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/JMSConduit.java Thu Aug 29 16:49:27 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())) {