diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-05 07:43:38 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2008-08-05 07:43:38 +0000 |
commit | 987e2e95f3456cc9fb417d3f57e6589266d3d3e3 (patch) | |
tree | c4bd64adb6c52ddaa3ab12cd53169dce9d0164fc /java/sca/modules/binding-jms-runtime/src | |
parent | 9c03cfa6ae67023a509212ac5cfbfba8fbfab075 (diff) |
Set correlation id on request, fix for void response
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@682613 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-jms-runtime/src')
-rw-r--r-- | java/sca/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java | 7 |
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)); } |