Author |
Message
|
loveneesh |
Posted: Wed Apr 03, 2002 10:54 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
Hi,
I have a message flow in which different database nodes are used for database insert/update, my problem is in one database node it goes fine and in another node there is some exception, but the earlier insert/update done is not being rolled back.
I am using DB2 7.1, MQSeries 5.2 and WMQI 2.1
Thanks,
Loveneesh
|
|
Back to top |
|
 |
kolban |
Posted: Thu Apr 04, 2002 6:00 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2001 Posts: 1072 Location: Fort Worth, TX, USA
|
Have you integrated the database as an XA managed resource for WMQI? Is the message flow configured to run under a transactional context? |
|
Back to top |
|
 |
loveneesh |
Posted: Thu Apr 04, 2002 8:05 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
yes , I have updated the database manager configurationa as XA managed resource for the tp_monitor as MQ.
yes i have configured my message flows to run as coordinated transaction.
Thanks,
Loveneesh |
|
Back to top |
|
 |
kirani |
Posted: Thu Apr 04, 2002 9:07 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
By any chance do you have your Transaction mode set to "Commit" in your message flow for one of the database node?
|
|
Back to top |
|
 |
loveneesh |
Posted: Thu Apr 04, 2002 9:35 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
No the database node has transaction mode set to "Automatic" in the message flow.
|
|
Back to top |
|
 |
abiram8 |
Posted: Fri Apr 05, 2002 4:01 am Post subject: |
|
|
 Master
Joined: 27 Mar 2002 Posts: 207 Location: India
|
Can you give more details on the message flow which Database nodes do you use
R.Abiram |
|
Back to top |
|
 |
loveneesh |
Posted: Fri Apr 05, 2002 4:49 am Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
In the message flow I have two database nodes. Both are inserting/updating data into two different tables.
In the first database node it is inserting successfully but in second it fails.
But It does not rollback the earlier insert/update done in the database.
|
|
Back to top |
|
 |
kirani |
Posted: Fri Apr 05, 2002 9:19 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
To use globally coordinated transactions, your must
1. Create a switch file for your database and define the database manager in the Broker queue managers configuration information (qm.ini file, XAResource stanza). This information includes the name of the switch load file.
2. Restart your queue manager and Broker after your make these changes. Make sure there is no error displayed in your event viewer while loading the switch file by your queue manager.
3. In Control Centers Assignment tab, after you assign the message flow to the broker, right click on the message flow and select Properties. This will bring up message flow properties. Select "Coordinated Transaction".
4. Do a deploy of the execution group.
Now your message flow is configured to run in Globally Coordinated Transaction mode.
|
|
Back to top |
|
 |
loveneesh |
Posted: Fri Apr 05, 2002 10:09 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
Kirani,
I have specified the XAResource Manager and switch file for the Broker QManager.
And there was no error in the event viewer when i restarted Broker QM and Broker .
|
|
Back to top |
|
 |
kirani |
Posted: Sat Apr 06, 2002 11:10 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
:0
Could you please explain how your nodes are arranged in a message flow, for example,
MQInput(out)->TryCatch(catch)-> ......
This will give us a clear picture of what you are doing in message flow.
|
|
Back to top |
|
 |
loveneesh |
Posted: Sun Apr 07, 2002 9:16 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
The flow is like this..
MQInput-->Compute Node-->Database Node1---> Database Node2-->MQoutput
Catch terminal of MQinput node is connected to handle exceptions.
Thanx
Loveneesh
|
|
Back to top |
|
 |
kirani |
Posted: Mon Apr 08, 2002 8:28 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Your message flow seems to be correct.
Can you post the contents of the ExceptionList. What are you doing in a Compute node? What version of MQSI are you using and what level of CSD?
|
|
Back to top |
|
 |
Miriam Kaestner |
Posted: Mon Apr 08, 2002 11:36 am Post subject: |
|
|
Centurion
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
|
Your message flow behaves exactly as you told it!
If you CATCH the exception (have MQInput node's CATCH terminal connected), then no rollback will occur - because you decided to handle the exception yourself.
So, if you want the rollback, you must either
- not catch the execption (not wire CATCH terminal) or
- at the end of the CATCH path explicitly throw an exception to force the rollback (with a THROW node or ESQL THROW). |
|
Back to top |
|
 |
loveneesh |
Posted: Mon Apr 08, 2002 9:11 pm Post subject: |
|
|
Novice
Joined: 24 Mar 2002 Posts: 11
|
kirani, I am using WMQI 2.1 (no CSD) on WinNT.I am just adding some fields to the message in the compute node.
Miriam, What shud I do if had to do exception handling as I'm putting messages to different queues depending upon the exception generated.?
Thanks,
Loveneesh
|
|
Back to top |
|
 |
Miriam Kaestner |
Posted: Tue Apr 09, 2002 6:43 am Post subject: |
|
|
Centurion
Joined: 26 Jun 2001 Posts: 103 Location: IBM IT Education Services, Germany
|
If you want to handle the exception and put the message to a, say, EXCEPTION queue, and want to rollback all other work you must
wire from MQInput node's CATCH terminal:
MQOutput node/Q=EXCEPTION / Advanced Tab: Transaction Mode=No
Throw node
|
|
Back to top |
|
 |
|