|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
PERFORMANCE OF 2 PHASE COMMIT |
« View previous topic :: View next topic » |
Author |
Message
|
rk400 |
Posted: Sat Mar 15, 2003 12:12 am Post subject: PERFORMANCE OF 2 PHASE COMMIT |
|
|
Apprentice
Joined: 04 Mar 2003 Posts: 27
|
Hi,
Is handling of 2 phase commit programatically better than handling it thru XA interface??.
If so, what is the use of XA??
RK |
|
Back to top |
|
 |
oz1ccg |
Posted: Sat Mar 15, 2003 5:39 am Post subject: |
|
|
 Yatiri
Joined: 10 Feb 2002 Posts: 628 Location: Denmark
|
how will you be able to code a twophase commit on your own ?
If you're dealing with a database system and MQ, what happens if your DB change fails after you vhae committed the MQ ? or the other way if MQ is committed before DB, and another appl. is updating the DB row ?
When you're dealing with XA, you dealing with two-phase commit. When just using MQCMIT without XA, RRS or another syncpoint coordinator, you have single phase commit.
This topic is well documented in the literature, every theoretical book on database implementation will have some stuff on the topic.
just some of my concerns  _________________ Regards, Jørgen
Home of BlockIP2, the last free MQ Security exit ver. 3.00
Cert. on WMQ, WBIMB, SWIFT. |
|
Back to top |
|
 |
rk400 |
Posted: Mon Mar 17, 2003 12:33 am Post subject: |
|
|
Apprentice
Joined: 04 Mar 2003 Posts: 27
|
Hi,
I've a sample code like this.
1. Get Message from Q1 in QMGR1.
2. Update the DB that the message is SENT and DBCOMMIT()
3. PUT message in Q2. in QMGR1.
4. MQcommit().
If the DBcommit fails I will not do the mqcommit() and i will get the same message again. No problems.
After commiting the database if my Mqcommit() fails I am catching the exception and updating the db that the message is not sent. Since MQ is not committed i will get the same message again.
Are there any problems in the above approach???
thanx..
RK |
|
Back to top |
|
 |
pgorak |
Posted: Mon Mar 17, 2003 3:13 am Post subject: |
|
|
 Disciple
Joined: 15 Jul 2002 Posts: 158 Location: Cracow, Poland
|
Sure. What if your step 3 (MQPUT) fails? You say you'll update the database - all right, but what if that update fails as well? Besides, the second update is not exactly what one generally needs - one rather needs to perform a rollback.
Piotr |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|