summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-08-25 15:02:01 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-08-25 15:02:01 +0000
commitb55bad231eba7a750c94e0fcfea8212260bff1f0 (patch)
tree3523f61400dbbaba70d784ccb758d5823b5c1719 /sca-java-2.x/trunk/modules/implementation-java-runtime/src/main
parent400a6d98bc4b9c140357a7ff3e9520b2613f8bb6 (diff)
TUSCANY-3659 - Enable asynch operation over the local SCA binding. This does what I think is the right thing but it doesn't necessarily do it in an optimal way yet.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@989157 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/implementation-java-runtime/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java
index 0d56a6ef9d..dc0bb94bde 100644
--- a/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java
+++ b/sca-java-2.x/trunk/modules/implementation-java-runtime/src/main/java/org/apache/tuscany/sca/implementation/java/invocation/ResponseDispatchImpl.java
@@ -63,6 +63,7 @@ public class ResponseDispatchImpl<T> implements ResponseDispatch<T>, Serializabl
*/
private static final long serialVersionUID = 300158355992568592L;
private static String WS_MESSAGE_ID = "WS_MESSAGE_ID";
+ private static String MESSAGE_ID = "MESSAGE_ID";
// A latch used to ensure that the sendResponse() and sendFault() operations are used at most once
// The latch is initialized with the value "false"
@@ -87,7 +88,12 @@ public class ResponseDispatchImpl<T> implements ResponseDispatch<T>, Serializabl
callbackRef = getAsyncCallbackRef( msg );
callbackAddress = msg.getFrom().getCallbackEndpoint().getURI();
- messageID = (String) msg.getHeaders().get(WS_MESSAGE_ID);
+
+ // TODO - why is WS stuff bleeding into general code?
+ messageID = (String) msg.getHeaders().get(MESSAGE_ID);
+ if (messageID == null){
+ messageID = (String) msg.getHeaders().get(WS_MESSAGE_ID);
+ }
} // end constructor
@@ -206,6 +212,7 @@ public class ResponseDispatchImpl<T> implements ResponseDispatch<T>, Serializabl
// Add in the header for the RelatesTo Message ID
msgContext.getHeaders().put(WS_MESSAGE_ID, messageID);
+ msgContext.getHeaders().put(MESSAGE_ID, messageID);
ThreadMessageContext.setMessageContext(msgContext);
} // end method setResponseHeaders