Tags:
Hi Neil,
I think CountDownLatch nor BlockingQueue can work for me.
To elaborate/ re-phrase my scenario;
The parent thread does not fork off new threads explicitly, but rather only does a sendJMSMessage(). The receipent subsystem does the 'interesting job' and returns a status ... also over JMS.
The JMS-listener in my code, gets activated (a new thread is launched) on receipt of the status message.
My requirement is the parent thread (that sent the several JMS requests) has to pause (wait) until all responses are received/ processed. (if 5 JMS requests were sent the parent needs to wait for all 5 respones = 5 intances of the JMS listener to finish processing.);
and so CountDownLatch cannot be used.
thx
g1
© 2024 Created by Neil Coffey. Powered by