Hi, you can use you're Thread as a key in a Map and have some sort of
listener which you notify when you get the response you can also use WS
addressing to know which listener to send the request to. I wouldn't think
you would have to got to that extend though.

If each thread uses it's own async handler instance I think you will be
thread safe. I'm not totally sure I understand the first part of your
question:


So far this is working, but I have a very fragile way of terminating the
main thread's loop on taking responses out of the queue.  I currently am
counting the number of requests sent, but it is very easy to forget to
increment the counter I'm using, and I figure there must be a better way
to  do this, either by checking directly some internal counter of
pending responses, or some other better trick.
</qoute>

What exactly is fragile and how are you trying to make it more robust?

As a side note: are you actually seeing the requests execute in parallel? If
so what version are you using :D



--
View this message in context: 
http://cxf.547215.n5.nabble.com/check-for-pending-async-responses-tp5619117p5619137.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to