summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/binding-jms-runtime/src
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-05 07:43:38 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2008-08-05 07:43:38 +0000
commit987e2e95f3456cc9fb417d3f57e6589266d3d3e3 (patch)
treec4bd64adb6c52ddaa3ab12cd53169dce9d0164fc /java/sca/modules/binding-jms-runtime/src
parent9c03cfa6ae67023a509212ac5cfbfba8fbfab075 (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.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));
}