From 73b4ab12bdbb33822b709c5225145bfde66dde32 Mon Sep 17 00:00:00 2001 From: edwardsmj Date: Tue, 21 Dec 2010 11:39:24 +0000 Subject: Extend AsyncResponseInvoker to be Generic to cope with binding-specific response address information - under TUSCANY-3807 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1051465 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules/binding-jms-runtime/src/main') diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java index 7bb91f3081..43bf090796 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wire/AsyncResponseDestinationInterceptor.java @@ -105,7 +105,7 @@ public class AsyncResponseDestinationInterceptor extends InterceptorAsyncImpl { String msgID = (String)msg.getHeaders().get("MESSAGE_ID"); // Create a response invoker and add it to the message headers - AsyncResponseInvoker respInvoker = new AsyncResponseInvoker(endpoint, null, asyncRespAddr, msgID); + AsyncResponseInvoker respInvoker = new AsyncResponseInvoker(endpoint, null, asyncRespAddr, msgID); msg.getHeaders().put("ASYNC_RESPONSE_INVOKER", respInvoker); } catch (JMSException e) { @@ -130,7 +130,8 @@ public class AsyncResponseDestinationInterceptor extends InterceptorAsyncImpl { * @returns - the updated Tuscany message */ public Message processResponse(Message msg) { - AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); + @SuppressWarnings("unchecked") + AsyncResponseInvoker respInvoker = (AsyncResponseInvoker)msg.getHeaders().get("ASYNC_RESPONSE_INVOKER"); if ( respInvoker == null ) return msg; String responseAddress = respInvoker.getResponseTargetAddress(); -- cgit v1.2.3