tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r984792 - /tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
Date Thu, 12 Aug 2010 14:08:26 GMT
Author: antelder
Date: Thu Aug 12 14:08:26 2010
New Revision: 984792

URL: http://svn.apache.org/viewvc?rev=984792&view=rev
Log:
Correctly set jms headers on the response message

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

Modified: tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.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/transport/TransportServiceInterceptor.java?rev=984792&r1=984791&r2=984792&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/transport/TransportServiceInterceptor.java
Thu Aug 12 14:08:26 2010
@@ -21,6 +21,7 @@ package org.apache.tuscany.sca.binding.j
 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
                 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))
{



Mime
View raw message