tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r988619 - /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
Date Tue, 24 Aug 2010 16:46:34 GMT
Author: antelder
Date: Tue Aug 24 16:46:34 2010
New Revision: 988619

URL: http://svn.apache.org/viewvc?rev=988619&view=rev
Log:
For callbacks with a oneway MEP set the JMSReplyTo with the callback destination

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.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/headers/HeaderReferenceInterceptor.java?rev=988619&r1=988618&r2=988619&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
Tue Aug 24 16:46:34 2010
@@ -24,7 +24,9 @@ package org.apache.tuscany.sca.binding.j
 import java.util.Map;
 
 import javax.jms.DeliveryMode;
+import javax.jms.Destination;
 import javax.jms.JMSException;
+import javax.naming.NamingException;
 
 import org.apache.tuscany.sca.assembly.WireFormat;
 import org.apache.tuscany.sca.binding.jms.JMSBinding;
@@ -114,7 +116,11 @@ public class HeaderReferenceInterceptor 
     
                 String callbackDestName = getCallbackDestinationName(reference);
                 if (callbackDestName != null) {
-                    jmsMsg.setStringProperty(JMSBindingConstants.CALLBACK_Q_PROPERTY, callbackDestName);
+                    jmsMsg.setStringProperty(JMSBindingConstants.CALLBACK_Q_PROPERTY, "jms:jndi:"
+ callbackDestName);
+                    if (operation.isNonBlocking()) {
+                    	Destination dest = context.getJmsResourceFactory().lookupDestination(callbackDestName);
+						jmsMsg.setJMSReplyTo(dest);
+                    }
                 }
             }
             
@@ -140,7 +146,9 @@ public class HeaderReferenceInterceptor 
             return tuscanyMsg;
         } catch (JMSException e) {
             throw new JMSBindingException(e);
-        } 
+        } catch (NamingException e) {
+            throw new JMSBindingException(e);
+		} 
     }
  
     



Mime
View raw message