org.springframework.remoting.support.RemoteInvocationUtils Java Examples

The following examples show how to use org.springframework.remoting.support.RemoteInvocationUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: HttpServiceProxy.java    From cuba with Apache License 2.0 6 votes vote down vote up
@Override
protected Object recreateRemoteInvocationResult(RemoteInvocationResult result) throws Throwable {
    Throwable throwable = result.getException();
    if (throwable != null) {
        if (throwable instanceof InvocationTargetException)
            throwable = ((InvocationTargetException) throwable).getTargetException();
        if (throwable instanceof RemoteException) {
            Exception exception = ((RemoteException) throwable).getFirstCauseException();
            // This is a checked exception declared in a service method
            // or runtime exception supported by client
            if (exception != null) {
                RemoteInvocationUtils.fillInClientStackTraceIfPossible(exception);
                throw exception;
            }
        }
    }
    return super.recreateRemoteInvocationResult(result);
}