Why do you need distributed tansactions here? You are just reading the messages from the MQ,and then persisting them in a DB. There's no publishing of messages happening here.Is there really any problem if your standalone java app is able to read a message from the MQ,but fails to persist it in the DB. Data integrity is not compromised here.So why do you need distributed transactions at all?
Joined: May 11, 2006
After reading the message from MQ if insertion fails then message must be rolled back to Queue.
Another possibility is that based on the message the business logic would require to connect to database and get some more fields and then insert into another database. All this happens as a single unit of work.
Let me know is this not distrubuted transactions.
I am looking for both 1) reading from MQ and inserting into DB
2) Reading from DB and inserting into another DB.
Thanks in advance.
Joined: Nov 13, 2006
I'm not sure about 1>. But 2> certainly qualifies as a distributed txn. XA is a set of JEE specs for distributed txns. You need to have an implementation for the same to configure a dist transactional setup.
subject: Distributed transaction with MQ And DB2 using java standalone