From 987e2e95f3456cc9fb417d3f57e6589266d3d3e3 Mon Sep 17 00:00:00 2001 From: antelder Date: Tue, 5 Aug 2008 07:43:38 +0000 Subject: 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 --- .../apache/tuscany/sca/binding/jms/provider/JMSBindingInvoker.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'java/sca/modules/binding-jms-runtime/src') 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)); } -- cgit v1.2.3