this.container = container;
}
public Object invokeTarget(Object payload) throws InvocationTargetException {
if (context == null) {
InstanceContext iContext = container.getContext(esName);
if (!(iContext instanceof ExternalServiceContext)) {
TargetException te = new TargetException("Unexpected target context type");
te.setIdentifier(iContext.getClass().getName());
te.addContextName(iContext.getName());
throw te;
}
context = (ExternalServiceContext) iContext;
}
ExternalJbiServiceClient client = (ExternalJbiServiceClient) context.getImplementationInstance(true);