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
This commit is contained in:
antelder 2012-01-26 16:25:28 +00:00
parent 878a308214
commit fcf920b0ab

View file

@ -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;
}