diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 14:08:26 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2010-08-12 14:08:26 +0000 |
commit | 7e546d4295fbeb4b9fce6065715c8cee71623de9 (patch) | |
tree | cc4229e747f5839043e0ca20cf46dd4b2189802d /sca-java-2.x/trunk/modules | |
parent | af9c9678d5807f4f55c2eb60ce9bcae4bbce299a (diff) |
Correctly set jms headers on the response message
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@984792 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/transport/TransportServiceInterceptor.java | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java index 8695a760a1..5ba01f5982 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java @@ -21,6 +21,7 @@ package org.apache.tuscany.sca.binding.jms.transport; import java.util.logging.Level; import java.util.logging.Logger; +import javax.jms.DeliveryMode; import javax.jms.Destination; import javax.jms.JMSException; import javax.jms.MessageProducer; @@ -152,8 +153,21 @@ public class TransportServiceInterceptor implements Interceptor { return msg; } - responseJMSMsg.setJMSDeliveryMode(requestJMSMsg.getJMSDeliveryMode()); - responseJMSMsg.setJMSPriority(requestJMSMsg.getJMSPriority()); + String operationName = msg.getOperation().getName(); + if (jmsBinding.getOperationJMSPriority(operationName) != null) { + responseJMSMsg.setJMSPriority(jmsBinding.getOperationJMSPriority(operationName)); + } + + if (jmsBinding.getOperationJMSType(operationName) != null) { + responseJMSMsg.setJMSType(jmsBinding.getOperationJMSType(operationName)); + } + if (jmsBinding.getOperationJMSDeliveryMode(operationName) != null) { + if (jmsBinding.getOperationJMSDeliveryMode(operationName)) { + responseJMSMsg.setJMSDeliveryMode(DeliveryMode.PERSISTENT); + } else { + responseJMSMsg.setJMSDeliveryMode(DeliveryMode.NON_PERSISTENT); + } + } if (correlationScheme == null || JMSBindingConstants.CORRELATE_MSG_ID.equalsIgnoreCase(correlationScheme)) { |