Trying to figure out exactly how to work distributed transactions that would
cover the following:
Jersey JAX-RS Web Service invocation, which sends a JMS Message, which is
routed to 1 or more other servers, databases are updated. The other servers
are all Glassfish, using OpenMQ.
I'm trying to get a distributed transaction to cover all of the above, such
that is somewhere along the chain of MDBs a failure occurs, that the whole
thing unravels.
I've tried this using CMT and BMT for the MDBs. When using BMT, various
timings of UserTransaction.rollback() have been tried, throwing a
RuntimeException, etc.
I'm using the iBATIS DAO framework for managing my transactions in the web
service invocation, which I'm using a JTA TransactionManager with the
java:comp/UserTransaction.
Am I missing something, or is this just not possible with what I'm trying to
accomplish? If this is possible, what (in broad terms) is necessary, in
terms of transaction configuration for the wrapping Web Service and the
configuration of the MDBs?
Something else I notice is that the web service invocation returns before
all of the MDBs fire, so I find it hard to believe that they can be combined
into a single transaction.
I've read through all the blogs and specs I can find when searching for
Distributed Transactions, JTA, and how the app server manages the
javax.jms.Session, what properties its ignoring (ack mode, trasacted
property etc), but I'm still very much unclear about the direct measures
required to get what I need.
Any thoughts?
Alex Sherwin
alex.sherwin_at_acadiasoft.com