diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/headers/HeaderReferenceInterceptor.java | 9 |
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) { |