Hi David,

I think the simplest way it to use standard async JAX-WS client (generated, 
Dispatch or dynamic) with JMS transport.

- In case of generated client you will have additional async methods:
    public Future<?> methodNameAsync(Type requestType, AsyncHandler<Type> 
asyncHandler);
    public Response<Type> methodNameAsync(Type requestType);

- Dispatch: Future<?> invokeAsync(T msg, AsyncHandler<T> handler)
- Proprietary CXF Dynamic Client: void invoke(ClientCallback callback, 
BindingOperationInfo oi, Object... params)

See this blog for details: 
http://ashakirin-cxf-async.blogspot.de/2014/03/asynchronous-api.html

CXF JMS Transport will recognize async calls, wouldn't block your client and 
invoke your callback or initialize the Future when response will be ready.
I think you don't need special configuration in this case.

Regards,
Andrei.

> -----Original Message-----
> From: David Karlsen [mailto:[email protected]]
> Sent: Donnerstag, 10. Dezember 2015 10:41
> To: [email protected]
> Subject: WS-addressing - decoupled responses over JMS?
> 
> Hi.
> 
> I have a wsdl which is request/reply (e.g. no one way operations).
> To increase throughput I'd like operations to be processed asynchronous -
> e.g. :
> 1. clients puts request onto queue - when put on queue client is
> *unblocke*d and continue other actions - e.g. not sitting and waiting for a
> response.
> 2. receiver picks up message, handles it and replies to client on some given
> responseQueue 3. client has listener - and given the nature of our payload
> we'd be able to correlate it to the request in 1.
> 
> I'm aware the async bindings for JAX-WS - but this is not what I want as they
> are semi-async and not long-living (either over HTTP or JMS) - and are in
> essence synchronous req/res given that my MEP in the WSDL is InOut and
> not OneWay.
> 
> I'm now looking into ws-addressing and decoupled responses (inspired by
> http://ashakirin-cxf-async.blogspot.no/) and it looks like a perfect fit - I 
> could
> keep my WSDL as is - but achieve the processing pattern outlined above - but
> I have a hard time configuring it - I've found examples for HTTP - but not
> when using JMS.
> 
> I am also wondering if the replyToDestination (e.g. response queue) would
> need to be encoded into WSA headers - or can be kept on the JMS
> messaging level (e.g. use JMSReplyTo property).
> 
> Also - is my understanding of WSA w/ deoupled responses correct?
> Referrring (inspired by http://ashakirin-cxf-async.blogspot.no/) - will the
> invoking client/thread terminate at 8 - and a new thread be activated at point
> 13 in that diagram?
> 
> 
> 
> --
> --
> David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen

Reply via email to