You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sl...@apache.org on 2011/01/14 15:54:03 UTC
svn commit: r1059028 -
/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
Author: slaws
Date: Fri Jan 14 14:54:03 2011
New Revision: 1059028
URL: http://svn.apache.org/viewvc?rev=1059028&view=rev
Log:
TUSCANY-3788 - Put some more info back into the response message based on what's stored in the response invoker
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java?rev=1059028&r1=1059027&r2=1059028&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/AsyncResponseInvoker.java Fri Jan 14 14:54:03 2011
@@ -76,7 +76,9 @@ public class AsyncResponseInvoker<T> imp
* If you have a Tuscany message you can call this
*/
public void invokeAsyncResponse(Message responseMessage) {
- responseMessage.getHeaders().put("ASYNC_RESPONSE_INVOKER", this);
+ responseMessage.getHeaders().put(Constants.ASYNC_RESPONSE_INVOKER, this);
+ responseMessage.getHeaders().put(Constants.RELATES_TO, relatesToMsgID);
+
if ((requestEndpoint.getBindingProvider() instanceof EndpointAsyncProvider) &&
(((EndpointAsyncProvider)requestEndpoint.getBindingProvider()).supportsNativeAsync())){
// process the response as a native async response
@@ -114,6 +116,12 @@ public class AsyncResponseInvoker<T> imp
Message msg = messageFactory.createMessage();
msg.setOperation(getOperation());
+
+ // on the the following will be null depending
+ // on whether this is native or non-native async
+ msg.setTo(requestEndpoint);
+ msg.setFrom(responseEndpointReference);
+
if( args instanceof Throwable ) {
msg.setFaultBody(args);
} else {