Posted: Sat Sep 13, 2003 3:00 am Post subject: Two-Phase Commit
Apprentice
Joined: 08 Feb 2003 Posts: 47
I have done the following to implement Two-Phase Commit in my program
1.I have configured my Qmanager for Two-Phase commit.
2.In my Program I have started a transaction making this QM as transaction manager.
3.I have obtained a database connection through this QM
4.I have put a message into a queue.
5.I am updating the message into the database.
6.If database update is perfect I am calling Qmanager.commit() else I am asking to back it out.
My Observations:
1.Till I close the connection obtained from the QM it is not getting commited to DB.
2.If I am calling QM.backout and afterwards calling connection.close() the database is getting commited.
My observation does not comply to Two-Phase commit specifications.Please help me in this regard. Also I want to know whether it is mandatory to make the connection.setAutoCommit(false) after every time the connection is obtained?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum