/*
* Adds JMS specific interceptors to the binding chain
*/
public void configure() {
InvocationChain bindingChain = endpoint.getBindingInvocationChain();
// add transport interceptor
bindingChain.addInterceptor(Phase.SERVICE_BINDING_TRANSPORT,
new TransportServiceInterceptor(registry, jmsBinding,
jmsResourceFactory,
endpoint) );
// add operation selector interceptor
bindingChain.addInterceptor(operationSelectorProvider.getPhase(),
operationSelectorProvider.createInterceptor());
// add operationProperties interceptor after operation selector
bindingChain.addInterceptor(Phase.SERVICE_BINDING_OPERATION_SELECTOR,
new OperationPropertiesInterceptor(jmsBinding, endpoint));
// add callback destination interceptor after operation selector
bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
new CallbackDestinationInterceptor(endpoint));
bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT, new HeaderServiceInterceptor(registry, jmsBinding));
// add async response interceptor after header interceptor
bindingChain.addInterceptor(Phase.SERVICE_BINDING_WIREFORMAT,
new AsyncResponseDestinationInterceptor(endpoint, registry) );
// add request wire format
bindingChain.addInterceptor(requestWireFormatProvider.getPhase(),
requestWireFormatProvider.createInterceptor());
// add response wire format, but only add it if it's different from the request
if (!jmsBinding.getRequestWireFormat().equals(jmsBinding.getResponseWireFormat())){
bindingChain.addInterceptor(responseWireFormatProvider.getPhase(),
responseWireFormatProvider.createInterceptor());
}
}