if (holder == null) {
TargetException e = new TargetException("Operation not configured");
e.setIdentifier(method.getName());
throw e;
}
InvocationConfiguration config = holder.config;
if (config != null) {
headInterceptor = config.getHeadInterceptor();
}
TargetInvoker invoker;
if (holder.cachedInvoker == null) {
assert config != null;
if(config.getTargetInvoker() == null){
TargetException e= new TargetException("No target invoker configured for operation");
e.setIdentifier(config.getMethod().getName());
throw e;
}
if (config.getTargetInvoker().isCacheable()) {
// clone and store the invoker locally
holder.cachedInvoker = (TargetInvoker) config.getTargetInvoker().clone();
invoker = holder.cachedInvoker;
} else {
invoker = config.getTargetInvoker();
}
} else {
assert config != null;
invoker = config.getTargetInvoker();
}
if (headInterceptor == null) {
try {
// short-circuit the dispatch and invoke the target directly
if (config.getTargetInvoker() == null) {
throw new AssertionError("No target invoker [" + method.getName() + "]");
}
return config.getTargetInvoker().invokeTarget(args);
} catch (InvocationTargetException e) {
// the cause was thrown by the target so throw it
throw e.getCause();
}
} else {