Return-Path: X-Original-To: apmail-tuscany-commits-archive@www.apache.org Delivered-To: apmail-tuscany-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 943729D09 for ; Thu, 26 Jan 2012 16:25:50 +0000 (UTC) Received: (qmail 99344 invoked by uid 500); 26 Jan 2012 16:25:50 -0000 Delivered-To: apmail-tuscany-commits-archive@tuscany.apache.org Received: (qmail 99273 invoked by uid 500); 26 Jan 2012 16:25:49 -0000 Mailing-List: contact commits-help@tuscany.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tuscany.apache.org Delivered-To: mailing list commits@tuscany.apache.org Received: (qmail 99266 invoked by uid 99); 26 Jan 2012 16:25:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jan 2012 16:25:49 +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, 26 Jan 2012 16:25:48 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 834AB238890B for ; Thu, 26 Jan 2012 16:25:28 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1236275 - /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java Date: Thu, 26 Jan 2012 16:25:28 -0000 To: commits@tuscany.apache.org From: antelder@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120126162528.834AB238890B@eris.apache.org> Author: antelder Date: Thu Jan 26 16:25:28 2012 New Revision: 1236275 URL: http://svn.apache.org/viewvc?rev=1236275&view=rev Log: Fix the two failing JMS compliance tests that set callback destiantions in the request message. I'm not sure if its whats intended after the recent callback changes but this gets the JMS compliance tests working Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java?rev=1236275&r1=1236274&r2=1236275&view=diff ============================================================================== --- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java (original) +++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java Thu Jan 26 16:25:28 2012 @@ -266,19 +266,22 @@ public class RRBJMSBindingInvoker extend } protected Destination getRequestDestination(org.apache.tuscany.sca.invocation.Message tuscanyMsg, Session session) throws JMSBindingException, NamingException, JMSException { - Destination requestDestination; -// if (!reference.isCallback()) { // TODO: 2.x migration, is this check needed? -// String toURI = tuscanyMsg.getTo().getURI(); -// if (toURI != null && toURI.startsWith("jms:")) { -// // the msg to uri contains the callback destination name -// // this is an jms physical name not a jndi name so need to use session.createQueue -// requestDestination = session.createQueue(toURI.substring(4)); -// } else { -// requestDestination = lookupDestination(); -// } -// } else { + Destination requestDestination = null; + + if (endpointReference.getReference().isForCallback()) { + + // Check if the CallbackDestinationInterceptor set a callback destination from the request msg + if (tuscanyMsg.getFrom().getTargetEndpoint() != null) { + if (tuscanyMsg.getFrom().getTargetEndpoint().getBinding() != null) { + this.jmsBinding = (JMSBinding)tuscanyMsg.getFrom().getTargetEndpoint().getBinding(); + requestDestination = lookupDestination(); + } + } + } + + if (requestDestination == null) { requestDestination = bindingRequestDest; -// } + } return requestDestination; }