Example usage for org.springframework.remoting RemoteInvocationFailureException RemoteInvocationFailureException

List of usage examples for org.springframework.remoting RemoteInvocationFailureException RemoteInvocationFailureException

Introduction

In this page you can find the example usage for org.springframework.remoting RemoteInvocationFailureException RemoteInvocationFailureException.

Prototype

public RemoteInvocationFailureException(String msg, Throwable cause) 

Source Link

Document

Constructor for RemoteInvocationFailureException.

Usage

From source file:org.apache.mina.springrpc.MinaClientInterceptor.java

@Override
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
    ReturnAddressAwareRemoteInvocation invocation = createReturnAddressAwareRemoteInvocation(methodInvocation);
    ReturnAddressAwareRemoteInvocationResult result = null;

    try {/*from  ww w . j a  v a2 s.  c  o m*/
        result = executeRequest(invocation, methodInvocation);
    } catch (Throwable ex) {
        throw convertMinaAccessException(ex);
    }
    try {
        return recreateRemoteInvocationResult(result);
    } catch (Throwable ex) {
        if (result.hasInvocationTargetException()) {
            throw ex;
        } else {
            throw new RemoteInvocationFailureException("Invocation of method [" + methodInvocation.getMethod()
                    + "] failed in mina remote service at [" + getServiceUrl() + "]", ex);
        }
    }
}