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 Discussion » Simulating XA failure

Post new topic  Reply to topic
 Simulating XA failure « View previous topic :: View next topic » 
Author Message
yashgt
PostPosted: Thu May 19, 2016 6:25 am    Post subject: Simulating XA failure Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

MQ Manager when used as a Transaction Coordinator, uses Two-phase commit protocol. It first issues a Ready-to-commit query to the resource managers. If they all are ready, the Commit is issued. I want to simulate a failure where the Ready to Commit succeeded and the Commit for one of the resource managers failed, resulting in the transaction becoming in-doubt.

All operations happen so fast that I do not get a chance to artificially kill a process or cause a failure. Any ideas on how I can acheive this? Is there a hook I can use? The UOW_COMMIT hook in the API exit functions seems to be at the Commit statement level and not at the su-step such as Ready to Commit.

Thanks,
Yash
Back to top
View user's profile Send private message
Andyh
PostPosted: Thu May 19, 2016 9:17 am    Post subject: Reply with quote

Master

Joined: 29 Jul 2010
Posts: 237

Writing a 'dummy' resource manager would be one way of doing this,
another would be to trace the MQCMIT flow and inject a break under the debugger into some internal MQ function called after the RM's have been prepared.

More realistic might be to set up a workload and to kill various components of the workload (e.g the QMgr or the DB) while it's in full flow.
Back to top
View user's profile Send private message
hughson
PostPosted: Thu May 19, 2016 1:48 pm    Post subject: Reply with quote

Padawan

Joined: 09 May 2013
Posts: 1914
Location: Bay of Plenty, New Zealand

There are XA calls into the API exit too. There's an XA_COMMIT_EXIT and an XA_COMPLETE_EXIT. Are they any use?

Cheers
Morag
_________________
Morag Hughson @MoragHughson
IBM MQ Technical Education Specialist
Get your IBM MQ training here!
MQGem Software
Back to top
View user's profile Send private message Visit poster's website
yashgt
PostPosted: Mon May 23, 2016 8:49 pm    Post subject: Reply with quote

Apprentice

Joined: 11 Nov 2014
Posts: 38

If MQ is the RM as well as the TM, this apparently does not work as discussed at http://www.mqseries.net/phpBB2/viewtopic.php?p=407139#407139
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 Discussion » Simulating XA failure
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.