try {
Object result = executeInternal(invocation.getClassName(),
invocation.getMethodName(),
invocation.getSignature(),
invocation.getArgs());
return new InvocationResult(result);
} catch (InvocationTargetException e) {
Throwable t = e.getCause();
if(t != null){
if(t instanceof ServiceException || t instanceof UnAuthorizedAccessException){
return new InvocationResult(t);
}else if(t instanceof ConnectionFailedException){
return new InvocationResult(
new ServiceException(ErrorCodes.CONNECTION_FAILED));
}
}
logger.log(Level.SEVERE, "Error while invoking: " +
invocation.getClassName() +"->"+ invocation.getMethodName(),