diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-26 16:25:28 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2012-01-26 16:25:28 +0000 |
commit | fcf920b0ab92dfab3bdb3c26843c044d4d193165 (patch) | |
tree | 564389f3f8e91b598a05ffd34cd27bdb9a2ee471 /sca-java-2.x/trunk/modules | |
parent | 878a3082147a778422c60bcd3586e2423002a6ea (diff) |
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
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1236275 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java index 06a061cdd9..610be6cc56 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/RRBJMSBindingInvoker.java @@ -266,19 +266,22 @@ public class RRBJMSBindingInvoker extends InterceptorAsyncImpl { } 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; } |