summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
diff options
context:
space:
mode:
authoredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2011-01-11 14:14:06 +0000
committeredwardsmj <edwardsmj@13f79535-47bb-0310-9956-ffa450edef68>2011-01-11 14:14:06 +0000
commitc714d7ff510918662faf56dd51f904732cb9bb67 (patch)
tree05fbf5bd6dc6696bdd43173ccd0626f9f55ee16d /sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
parent26ed4a51216e4d8fe65e035ed540780c74cd4555 (diff)
Add capability to support Bindings that support Async invocations natively - as under TUSCANY-3801
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1057648 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java')
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java19
1 files changed, 9 insertions, 10 deletions
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
index 34c00dbb94..62593ba895 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
@@ -178,7 +178,10 @@ public class RuntimeInvoker implements Invoker, InvokerAsyncRequest {
// temporary fix to swallow the dummy exception that's
// thrown back to get past the response chain processing.
if (!(ex instanceof AsyncResponseException)){
- throw new ServiceRuntimeException(ex);
+ // send the exception in through the
+ // async response processing path
+ msg.setFaultBody(ex);
+ invokeAsyncResponse(msg);
}
}
} finally {
@@ -197,15 +200,11 @@ public class RuntimeInvoker implements Invoker, InvokerAsyncRequest {
public void invokeAsyncResponse(Message msg) {
InvocationChain chain = invocable.getInvocationChain(msg.getOperation());
Invoker tailInvoker = chain.getTailInvoker();
- try {
- ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg);
- } catch (Throwable ex) {
- throw new ServiceRuntimeException(ex);
- }
+ ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg);
} // end method invokeAsyncResponse
- @Override
- public void invokeAsyncRequest(Message msg) throws Throwable {
- invokeAsync(msg);
- } // end method invokeAsyncRequest
+ @Override
+ public void invokeAsyncRequest(Message msg) throws Throwable {
+ invokeAsync(msg);
+ } // end method invokeAsyncRequest
}