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(),
e);