summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/binding-jms-runtime
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 13:25:25 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2010-10-25 13:25:25 +0000
commit7f7a2eb51e40a390dca1ddf95192d4c7c84e7d99 (patch)
tree73b003a6651d53ea4f95cd94b8bf17e853596cc2 /sca-java-2.x/trunk/modules/binding-jms-runtime
parentd3e72892341a24bd3bfed0b8dd9b3622e98738df (diff)
When the correlation scheme is set to correlationId then make sure a correlationid is set on a request message
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1027105 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime')
-rw-r--r--sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
index 8f8c27a135..61c5dc8263 100644
--- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
+++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.binding.jms.headers;
import java.util.Map;
+import java.util.UUID;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
@@ -106,9 +107,11 @@ public class HeaderReferenceInterceptor implements Interceptor {
jmsMsg.setJMSExpiration(jmsBinding.getEffectiveJMSTimeToLive(operationName));
}
- if (jmsBinding.getOperationJMSCorrelationId(operationName) != null) {
- jmsMsg.setJMSCorrelationID(jmsBinding.getOperationJMSCorrelationId(operationName));
- }
+ if (jmsBinding.getOperationJMSCorrelationId(operationName) != null) {
+ jmsMsg.setJMSCorrelationID(jmsBinding.getOperationJMSCorrelationId(operationName));
+ } else if (JMSBindingConstants.CORRELATE_CORRELATION_ID.equals(jmsBinding.getCorrelationScheme())) {
+ jmsMsg.setJMSCorrelationID(UUID.randomUUID().toString());
+ }
if (tuscanyMsg.getFrom().getCallbackEndpoint() != null) {