aspose file tools*
The moose likes Distributed Java and the fly likes Distributed transaction with MQ And DB2 using java standalone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Distributed transaction with MQ And DB2 using java standalone" Watch "Distributed transaction with MQ And DB2 using java standalone" New topic
Author

Distributed transaction with MQ And DB2 using java standalone

iamiqbal.m Mohiuddin
Greenhorn

Joined: May 11, 2006
Posts: 12
I have a scenario where in the java standalone program reads message from MQ queue and inserts into database.
This should happen as a single unit of work.

My question is java standalone supports distributed transaction? [XA etc...]

If anoyone of you have handled this kind of scenario i woud appreciate any pointers in this direction.

Regards,
Iqbal.M

Ajay Saxena
Ranch Hand

Joined: Nov 13, 2006
Posts: 154
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?
iamiqbal.m Mohiuddin
Greenhorn

Joined: May 11, 2006
Posts: 12
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.
Ajay Saxena
Ranch Hand

Joined: Nov 13, 2006
Posts: 154
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Distributed transaction with MQ And DB2 using java standalone
 
Similar Threads
Websphere Business Integration Server and MQ
2 phase commit in java ----!!!VERY URGENT!!! (Request for Kyle and others)
2 phase commit in java !!!!!!! VERY URGENT !!!!!
2 phase commit in java !!!!!!!!! URGENT!!!!!!!!!!!
2 phase commit in java