summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
index a5701f6d1b..a14e2bd018 100644
--- a/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
+++ b/java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java
@@ -227,7 +227,8 @@ public class JMSBindingInvoker implements Invoker, DataExchangeSemantics {
return null;
} else {
Message replyMsg = receiveReply(session, replyToDest, requestMsg.getJMSMessageID());
- return ((Object[])responseMessageProcessor.extractPayloadFromJMSMessage(replyMsg))[0];
+ Object[] response = (Object[])responseMessageProcessor.extractPayloadFromJMSMessage(replyMsg);
+ return (response != null && response.length > 0) ? response[0] : null;
}
} finally {
@@ -309,6 +310,10 @@ public class JMSBindingInvoker implements Invoker, DataExchangeSemantics {
}
}
+ if (jmsBinding.getOperationJMSCorrelationId(operationName) != null) {
+ jmsMsg.setJMSCorrelationID(jmsBinding.getOperationJMSCorrelationId(operationName));
+ }
+
if (jmsBinding.getOperationJMSPriority(operationName) != null) {
jmsMsg.setJMSPriority(jmsBinding.getOperationJMSPriority(operationName));
}