Hi
On 10/09/12 14:29, David Mansfield wrote:
Hi All,

Just wondering what the best practice is for having a web service client
"wait" for some event that happens server side.

In my particular case, I need to have a web service along the lines of
"get pending transactions" and a new transaction is submitted via a form
submit in the web application (servlet), hopefully in the same VM.

I realize polling is an option of course, but I despise polling and
would prefer some kind of blocking-queue type implementation with a
blocking "take" in the web service method and a "put" in the servlet
during the POST or whatever.

Some other considerations: it will only ever be _one_ client calling the
"get pending transactions" so issues of resource consumption by a
blocking call are not relevant.

Can I simply implement some blocking java code inside my web service
method and everything will just work neatly?

I have read about multiple asynchronous replies to a web-service method
and was wondering what that really means and if there are a any
references in CXF documentation?

You may also consider combining say HTTP & JMS, by having a blocking client waiting on the queue. On the server side, it can be a single service bean shared between JMS & HTTP/WS endpoints

Sergey

TIA,
David Mansfield
Cobite, INC.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to