try {
return methodHandler.invoke(resource, method, args);
} catch (IllegalAccessException ex) {
throw new ProcessingException(LocalizationMessages.ERROR_RESOURCE_JAVA_METHOD_INVOCATION(), ex);
} catch (IllegalArgumentException ex) {
throw new ProcessingException(LocalizationMessages.ERROR_RESOURCE_JAVA_METHOD_INVOCATION(), ex);
} catch (UndeclaredThrowableException ex) {
throw new ProcessingException(LocalizationMessages.ERROR_RESOURCE_JAVA_METHOD_INVOCATION(), ex);
} catch (InvocationTargetException ex) {
throw mapTargetToRuntimeEx(ex.getCause());
} catch (Throwable t) {
throw new ProcessingException(t);
} finally {
tracingLogger.logDuration(ServerTraceEvent.METHOD_INVOKE, timestamp, resource, method);
}
}
};