try {
return invocation.getMethod().invoke(this.hessianProxy, invocation.getArguments());
}
catch (InvocationTargetException ex) {
if (ex.getTargetException() instanceof HessianRuntimeException) {
HessianRuntimeException hre = (HessianRuntimeException) ex.getTargetException();
Throwable rootCause = (hre.getRootCause() != null ? hre.getRootCause() : hre);
throw convertHessianAccessException(rootCause);
}
else if (ex.getTargetException() instanceof UndeclaredThrowableException) {
UndeclaredThrowableException utex = (UndeclaredThrowableException) ex.getTargetException();
throw convertHessianAccessException(utex.getUndeclaredThrowable());