epr.rebuild();
chains.clear();
}
} // end if
InvocationChain chain = getInvocationChain(method, source);
if (chain == null) {
throw new IllegalArgumentException("No matching operation is found: " + method);
}
// Organize for an async service
RuntimeEndpoint theEndpoint = getAsyncCallback(source);
boolean isAsyncService = false;
if (theEndpoint != null) {
// ... the service is asynchronous but binding does not support async natively ...
attachFuture(theEndpoint, future);
} // end if
if( isAsyncInvocation((RuntimeEndpointReference)source ) ) {
isAsyncService = true;
// Get hold of the JavaAsyncResponseHandler from the chain dealing with the async response
Invoker theInvoker = chain.getHeadInvoker();
if( theInvoker instanceof InterceptorAsync ) {
InvokerAsyncResponse responseInvoker = ((InterceptorAsync)theInvoker).getPrevious();
if( responseInvoker instanceof JDKAsyncResponseInvoker ) {
// Register the future as the response object with its ID
((JDKAsyncResponseInvoker)responseInvoker).registerAsyncResponse(future.getUniqueID(), future);