if (holder == null) {
TargetException e = new TargetException("Operation not configured");
e.setIdentifier(operation.getName());
throw e;
}
OutboundInvocationChain chain = holder.chain;
TargetInvoker invoker;
if (holder.cachedInvoker == null) {
assert chain != null;
if (chain.getTargetInvoker() == null) {
TargetException e = new TargetException("No target invoker configured for operation");
e.setIdentifier(chain.getOperation().getName());
throw e;
}
if (chain.getTargetInvoker().isCacheable()) {
// clone and store the invoker locally
holder.cachedInvoker = (TargetInvoker) chain.getTargetInvoker().clone();
invoker = holder.cachedInvoker;
} else {
invoker = chain.getTargetInvoker();
}
} else {
assert chain != null;
invoker = chain.getTargetInvoker();
}
messageId = context.getCurrentMessageId();
context.setCurrentMessageId(null);
correlationId = context.getCurrentCorrelationId();
context.setCurrentCorrelationId(null);