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 » WebSphere Message Broker (ACE) Support » How to test an XA configuration

Post new topic  Reply to topic
 How to test an XA configuration « View previous topic :: View next topic » 
Author Message
hopsala
PostPosted: Tue Jan 31, 2012 4:25 am    Post subject: How to test an XA configuration Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

Hey

So I've got a V7 broker with a V7.1 QM. After a bit of floundering about, I seem to have successfully configured the QM to coordinate transactions with an Oracle DB on another machine, and all were happy in lego-land.

Thing is, how do I test if it's working? The broker and QM are up and running (which is already an accomplishment), and even without XA coordination I've got basic transactionality going. For example, the following flow:
MQInput > Compute (DB INSERT) > MQOutput > Throw
doesn't write to db or to MQ regardless of whether the "coordinated transaction" flag on the BAR file is checked.

So how do I test if my XA config is running properly? any ideas?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 31, 2012 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

First off, XA isn't used unless the Global Transaction box is checked. But you know that Broker always does it's best effort to coordinate transactions even without XA enabled.

So that's why your flow "works" if you don't set the Global Transaction, because Broker is making best efforts to perform local transaction coordination - and broker is pretty good at this.

If you want to ensure that your XA configuration is correct, then make sure you do enable the Global Transaction. Then perform a transaction of some kind - i.e. use a flow that starts with an MQ node to perform an update on a database.

If the XA configuration isn't working, then this will fail spectacularly and noisily. If the XA configuration is correct, then it will work silently.

If you somehow actually are required by your <deleted/> customer to "verify XA", you will either have to tell them to trust the product or concoct ridiculous methods, i.e. removing network cables at strategic microseconds, to generate an XA failure case that is not covered by broker normal transactional handling.
Back to top
View user's profile Send private message
hopsala
PostPosted: Tue Jan 31, 2012 4:54 am    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

Hello Jeff, a quick and pertinent reply as always.

mqjeff wrote:
First off, XA isn't used unless the Global Transaction box is checked. But you know that Broker always does it's best effort to coordinate transactions even without XA enabled.
So that's why your flow "works" if you don't set the Global Transaction, because Broker is making best efforts to perform local transaction coordination - and broker is pretty good at this.

So far I'm with you, and this is why I asked why I asked.

mqjeff wrote:
If you somehow actually are required by your <deleted/><replace="marvelous"/> customer to "verify XA", you will either have to tell them to trust the product or concoct ridiculous methods, i.e. removing network cables at strategic microseconds, to generate an XA failure case that is not covered by broker normal transactional handling.

is exactly what I'm trying to avoid..

mqjeff wrote:
If you want to ensure that your XA configuration is correct, then make sure you do enable the Global Transaction. Then perform a transaction of some kind - i.e. use a flow that starts with an MQ node to perform an update on a database.

If the XA configuration isn't working, then this will fail spectacularly and noisily. If the XA configuration is correct, then it will work silently.

?
Apparently I don't quite get what you mean. Isn't this exactly what I did? I mean:
hopsala wrote:
MQInput > Compute (DB INSERT) > MQOutput > Throw
doesn't write to db or to MQ regardless of whether the "coordinated transaction" flag on the BAR file is checked.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Jan 31, 2012 4:58 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

hopsala wrote:
mqjeff wrote:
If you want to ensure that your XA configuration is correct, then make sure you do enable the Global Transaction. Then perform a transaction of some kind - i.e. use a flow that starts with an MQ node to perform an update on a database.

If the XA configuration isn't working, then this will fail spectacularly and noisily. If the XA configuration is correct, then it will work silently.

?
Apparently I don't quite get what you mean. Isn't this exactly what I did? I mean:
hopsala wrote:
MQInput > Compute (DB INSERT) > MQOutput > Throw
doesn't write to db or to MQ regardless of whether the "coordinated transaction" flag on the BAR file is checked.


Yes, that is exactly what you did. Except for that pesky throw node. It allows you to demonstrate that both transactions are rolled back, but that's a negative acknowledgement.

Again, if the XA configuration is incorrect, then you will either get a lot of errors when you deploy the flow WITH Global Transaction checked (again, no XA is invovled if this is *not* checked), or you will get a lot of errors when the flow attempts to use the database connection.

If you DO NOT see these errors, and you're SURE that Global Transaction is checked (i.e. you can see this in the deployed properties of the flow), then your configuration is correct.

And then either Broker's XA code works, or it doesn't. This is, again, where you tell the <deleted/> client to TRUST THE CODE.
Back to top
View user's profile Send private message
hopsala
PostPosted: Tue Jan 31, 2012 5:10 am    Post subject: Reply with quote

Guardian

Joined: 24 Sep 2004
Posts: 960

mqjeff wrote:
Again, if the XA configuration is incorrect, then you will either get a lot of errors when you deploy the flow WITH Global Transaction checked (again, no XA is invovled if this is *not* checked), or you will get a lot of errors when the flow attempts to use the database connection.

If you DO NOT see these errors, and you're SURE that Global Transaction is checked (i.e. you can see this in the deployed properties of the flow), then your configuration is correct.

Ah! I was just wondering about that, tried to find some relevant reference in the info center. Should have mentioned I ran a similar flow earlier that finishes correctly (with MQOutput instead of Throw) with global coordination flagged, and it worked as expected - everything was committed. Which you say means XA is configured properly, which means another task checked off the infinite administration list. Grand!

mqjeff wrote:
And then either Broker's XA code works, or it doesn't. This is, again, where you tell the <deleted/> client to TRUST THE CODE.

Oh yes, and we all know how clients like to listen to REASON..

Thanks!
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 » WebSphere Message Broker (ACE) Support » How to test an XA configuration
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.