cancel
Showing results for 
Search instead for 
Did you mean: 

sync/async bridge

rmortale
Champ in-the-making
Champ in-the-making
How to implement a sync/async bridge in activiti?

For example: a client calls a Web Service this Web Service needs to call a async (JMS) service. The JMS service returns a result. Then result is returned to the Web service caller without breaking the connection!

regards
3 REPLIES 3

pmsevestre
Champ in-the-making
Champ in-the-making
You can use the Reply-To feature available in JMS, so whoever handles the message will send the result to a reply queue. Meanwhile, your webservice implementation will sit in a synchronous call waiting for a reply in that reply queue.

Thisk Stackoveflow question can give you some ideas on how to implement this:

http://stackoverflow.com/questions/8846330/jms-replyto-how-does-it-work

That said, It seems to me that

pmsevestre
Champ in-the-making
Champ in-the-making
You can use the Reply-To feature available in JMS, so whoever handles the message will send the result to a reply queue. Meanwhile, your webservice implementation will sit in a synchronous call waiting for a reply in that reply queue.

Thisk Stackoveflow question can give you some ideas on how to implement this:

http://stackoverflow.com/questions/8846330/jms-replyto-how-does-it-work

That said, It seems to me that

rmortale
Champ in-the-making
Champ in-the-making
Hi,

the JMS part is already implemented as an MDB receiving the request and a Java receive task waiting for the response.

regards