Hi

For JAXRS you can use a number of approaches.
1. Continuations - I've just posted a blog entry [1] showing one way how to do it - the formatting is not good, sorry about it, could not figure out quickly how to show Java code properly in an HTML page in a blogger blog entry. If someone knows then please send me an email offline - would be appreciated.

That's the only support for asynchronous services that we have in JAXRS at the moment. I'm wondering, can we reuse AsynchronousHandlers used by JAXWS somehow - need to look into it

The net effect is that after continuation.suspend() is called a transport thread will be immediately released and a pending request will be put in a request queue. When your asynchronous activity is completed, it will call continuation.resume() and the request will come back into your method. See this test [2] for another example

2. Just provide a response URI as part of your invocation (either as a query parameter or as part of the body when applicable) and reply to it whenever the response is ready

3. If applicable, consider returning a resource URI which will represent an asynchromous activity and which a client will poll for for the results...

Cheers, Sergey

[1] http://sberyozkin.blogspot.com/2008/12/continuations-in-cxf.html
[2] 
http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookContinuationStore.java


I am trying to build a cxf based asynchronous restful web service, i saw the
polling ayns web service on the site but couldn't find asynchronous rest
sample

Have any tried this ?


--
View this message in context: 
http://www.nabble.com/Asynchronous--Restful-web-service-tp20798394p20798394.html
Sent from the cxf-user mailing list archive at Nabble.com.




Reply via email to