tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
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 GMT
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;
     }    



Mime
View raw message