|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
How to control "commit" on multiple DB nodes |
« View previous topic :: View next topic » |
Author |
Message
|
m_wip |
Posted: Thu Apr 08, 2004 11:10 pm Post subject: How to control "commit" on multiple DB nodes |
|
|
Newbie
Joined: 06 Apr 2004 Posts: 8
|
I am currently using 3 database nodes to update 3 tables in the same schema. My requirement is to commit only if all three updates are successful.
I am using the transaction property of the node (setting it to automatic) for all 3 nodes.
While testing the same (in debug mode), the first 2 DB nodes work fine and the third one fails ( have put a deliberate SQL error for testing). While the flow is still executing, the first 2 updates are not commited (on checking the tables), but on completion of the flow, they do get commited.
This doesn't satisfy my requmnt.
Do let me know if there is any other way of controlling Commit on multiple DB nodes.
Thanks! |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Apr 09, 2004 3:00 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
If the flow exits "successfully", then transactions will be committed.
If the flow ends in an "error" condition, then transactions will be rolled back along with rolling the message back to the queue.
You need to make sure that you throw an error that propogates back to the input node when your database steps fall, and then make sure that you do not do anything to commit the actual transaction within your error handling, nor cause the flow to exit "successfully". _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Empeterson |
Posted: Fri Apr 09, 2004 6:33 am Post subject: |
|
|
Centurion
Joined: 14 Apr 2003 Posts: 125 Location: Foxboro, MA
|
Make sure you have Throw Exception on Database error clicked on the advanced tab of the node. I also believe if you have any failure or catch nodes wired on any nodes other than the input node, then wmqi assumes you are dealing with the exception yourself and treats the flow as successful. At this point all transactions will be commited. I have a similar flow and the only failure node I have hooked up is the one on the input node. _________________ IBM Certified Specialist: MQSeries
IBM Certified Specalist: Websphere MQ Integrator |
|
Back to top |
|
 |
JLRowe |
Posted: Sat Apr 10, 2004 6:50 am Post subject: |
|
|
 Yatiri
Joined: 25 May 2002 Posts: 664 Location: South East London
|
Consider setting up 2 phase commit also (search help for XA) |
|
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
|
|
|
|