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 » 2-Phase Commit problem in a message flow

Post new topic  Reply to topic Goto page 1, 2  Next
 2-Phase Commit problem in a message flow « View previous topic :: View next topic » 
Author Message
loveneesh
PostPosted: Wed Apr 03, 2002 10:54 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kolban
PostPosted: Thu Apr 04, 2002 6:00 am    Post subject: Reply with quote

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
View user's profile Send private message
loveneesh
PostPosted: Thu Apr 04, 2002 8:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Thu Apr 04, 2002 9:07 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
loveneesh
PostPosted: Thu Apr 04, 2002 9:35 pm    Post subject: Reply with quote

Novice

Joined: 24 Mar 2002
Posts: 11

No the database node has transaction mode set to "Automatic" in the message flow.
Back to top
View user's profile Send private message Send e-mail
abiram8
PostPosted: Fri Apr 05, 2002 4:01 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
loveneesh
PostPosted: Fri Apr 05, 2002 4:49 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Fri Apr 05, 2002 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
loveneesh
PostPosted: Fri Apr 05, 2002 10:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Sat Apr 06, 2002 11:10 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
loveneesh
PostPosted: Sun Apr 07, 2002 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kirani
PostPosted: Mon Apr 08, 2002 8:28 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Miriam Kaestner
PostPosted: Mon Apr 08, 2002 11:36 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
loveneesh
PostPosted: Mon Apr 08, 2002 9:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Miriam Kaestner
PostPosted: Tue Apr 09, 2002 6:43 am    Post subject: Reply with quote

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

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » 2-Phase Commit problem in a message flow
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.