I am building an application which has the following flow:
webservice1 --> jmsqueue1 --> mdb1 --> jmsqueue2 --> mdb2 --->...
webservice1 - receives a SOAP search request, inserts the request into the database, and sends a jms message containing the unique id to jmsqueue1.
mdb1 - reads from jmsqueue1, does some processing, and sends the jms message containing the unique id to jmsqueue2.
mdb2 - reads from jmsqueue2, goes to the database to retrieve the search request, and does some kind of processing
My question is: using Spring AOP or other technologies is it possible to have a transaction spanning across all of the components described aboved, so that if an error occurs on mdb2 then a rollback will occur on jmsqueue2, mdb1, jmsqueue1, webservice1? I'm not sure if what I'm describing is even possible. Does anyone have any suggestions?
Thanks in advanced!