summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java
diff options
context:
space:
mode:
authorbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-08-26 16:14:36 +0000
committerbdaniel <bdaniel@13f79535-47bb-0310-9956-ffa450edef68>2010-08-26 16:14:36 +0000
commit49b093b922f8316caa671a0785d65d9950c43654 (patch)
treebec0c7bc0dc29a29ecec14b091e789a3b59e1dd3 /sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java
parent3eeb20cf2dfef7b800f54751578819099563a473 (diff)
BJM_4003 Set the "scaOperationName" property on response messages when using default wire format
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@989803 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java
index 731de78cfe..da6f283ff9 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsdefault/runtime/WireFormatJMSDefaultServiceInterceptor.java
@@ -22,9 +22,12 @@ import java.util.HashMap;
import java.util.List;
import javax.jms.BytesMessage;
+import javax.jms.JMSException;
import javax.jms.Session;
import org.apache.tuscany.sca.binding.jms.JMSBinding;
+import org.apache.tuscany.sca.binding.jms.JMSBindingConstants;
+import org.apache.tuscany.sca.binding.jms.JMSBindingException;
import org.apache.tuscany.sca.binding.jms.context.JMSBindingContext;
import org.apache.tuscany.sca.binding.jms.provider.DefaultMessageProcessor;
import org.apache.tuscany.sca.binding.jms.provider.JMSResourceFactory;
@@ -160,6 +163,15 @@ public class WireFormatJMSDefaultServiceInterceptor implements Interceptor {
}
}
+
+ try {
+ responseJMSMsg.setStringProperty(JMSBindingConstants.DEFAULT_OPERATION_PROP_NAME, msg.getOperation().getName());
+ } catch (JMSException e) {
+ // Not sure what to do at this point.. it doesn't make sense to create a fault message.
+ // Throwing a runtime exception for now.
+ throw new JMSBindingException(e);
+ }
+
msg.setBody(responseJMSMsg);
return msg;