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 2010/12/23 14:06:07 UTC
svn commit: r1052256 -
/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
Author: slaws
Date: Thu Dec 23 13:06:07 2010
New Revision: 1052256
URL: http://svn.apache.org/viewvc?rev=1052256&view=rev
Log:
Throw systematic errors as ServiceRuntimeExceptions
Modified:
tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java?rev=1052256&r1=1052255&r2=1052256&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/invocation/RuntimeInvoker.java Thu Dec 23 13:06:07 2010
@@ -178,10 +178,7 @@ public class RuntimeInvoker implements I
// temporary fix to swallow the dummy exception that's
// thrown back to get past the response chain processing.
if (!(ex instanceof AsyncResponseException)){
- // send the exception in through the
- // async response processing path
- msg.setFaultBody(ex);
- invokeAsyncResponse(msg);
+ throw new ServiceRuntimeException(ex);
}
}
} finally {
@@ -200,11 +197,15 @@ public class RuntimeInvoker implements I
public void invokeAsyncResponse(Message msg) {
InvocationChain chain = invocable.getInvocationChain(msg.getOperation());
Invoker tailInvoker = chain.getTailInvoker();
- ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg);
+ try {
+ ((InvokerAsyncResponse)tailInvoker).invokeAsyncResponse(msg);
+ } catch (Throwable ex) {
+ throw new ServiceRuntimeException(ex);
+ }
} // 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
}