// binding provided async response handler
if (isAsyncInvocation() &&
bindingInvocationChain == null){
// fix up the operation chain response path to point back to the
// binding provided async response handler
ServiceBindingProvider serviceBindingProvider = getBindingProvider();
if (serviceBindingProvider instanceof EndpointAsyncProvider){
EndpointAsyncProvider asyncEndpointProvider = (EndpointAsyncProvider)serviceBindingProvider;
InvokerAsyncResponse asyncResponseInvoker = asyncEndpointProvider.createAsyncResponseInvoker();
for (InvocationChain chain : getInvocationChains()){
Invoker invoker = chain.getHeadInvoker();
if (invoker instanceof InterceptorAsync){
((InterceptorAsync)invoker).setPrevious(asyncResponseInvoker);
} else {
//TODO - throw error once the old async code is removed
} // end if
} // end for
} else {
// TODO - throw error once the old async code is removed
} // end if
} // end if
ServiceBindingProvider provider = getBindingProvider();
if ((provider != null) && (provider instanceof OptimisingBindingProvider)) {
//TODO - remove this comment once optimisation codepath is tested
((OptimisingBindingProvider)provider).optimiseBinding( this );
} // end if