ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » PERFORMANCE OF 2 PHASE COMMIT

Post new topic  Reply to topic
 PERFORMANCE OF 2 PHASE COMMIT « View previous topic :: View next topic » 
Author Message
rk400
PostPosted: Sat Mar 15, 2003 12:12 am    Post subject: PERFORMANCE OF 2 PHASE COMMIT Reply with quote

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
View user's profile Send private message
oz1ccg
PostPosted: Sat Mar 15, 2003 5:39 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
rk400
PostPosted: Mon Mar 17, 2003 12:33 am    Post subject: Reply with quote

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
View user's profile Send private message
pgorak
PostPosted: Mon Mar 17, 2003 3:13 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » PERFORMANCE OF 2 PHASE COMMIT
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.