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 » Transaction Control in Message Flow

Post new topic  Reply to topic
 Transaction Control in Message Flow « View previous topic :: View next topic » 
Author Message
wildtiger
PostPosted: Wed Dec 10, 2008 9:11 am    Post subject: Transaction Control in Message Flow Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

I have a question about transaction control in following message flow.

Code:

                                            +-------+
                                            |       |
                       +-+------------------+  MQ   |
                       | |                  |Output1|
+-------+              | |                  +-------+
|       +--(Failure)---+ |
|  MQ   +--(Catch)-------+                  +--------+         +-------+
| Input +--(Out)----+                       |        |         |       |
+-------+           |                    +--+Compute2+--(Out)--+  MQ   |
                    |                    |  |        |         |Output2|
                    |  +--------+        |  +--------+         +-------+
                    |  |        |        |
                    +--+Compute1+-(Out)--+
                       |        |        |
                       +--------+        |  +--------+         +-------+
                                         |  |        |         |       |
                                         +--+Compute3+--(Out)--+  MQ   |
                                            |        |         |Output3|
                                            +--------+         +-------+


In above message flow, the transaction attribute of the MQInput node is "Yes", all rest are "Automatic". When there's an exception thrown in Compute2 node, an output message was sent to MQOutput3 queue while the input message was sent to MQOutput1).

This is not what I want. I want the whole transaction to be backed out when there is an error or exception occurred in anywhere in the flow. Either two messages output to MQOutput2 and MQOutput3 (one in each queue) when the flow completes successfully or one message (the original input message) goes to MQOutput1 if there is an error/exception in the flow.

When I disconnect the "Catch" terminal of the MQInput node, I found it worked as what I want. But any one help explain it?
[/quote]
Back to top
View user's profile Send private message
mqjeff
PostPosted: Wed Dec 10, 2008 9:17 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I bet there's a question on the Broker Developer certification exam that covers just this topic.
Back to top
View user's profile Send private message
wildtiger
PostPosted: Wed Dec 10, 2008 9:37 am    Post subject: Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

Where can I find the information?
mqjeff wrote:
I bet there's a question on the Broker Developer certification exam that covers just this topic.
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Dec 10, 2008 11:08 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wildtiger wrote:
Where can I find the information?


Link's at the top of the page
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
wildtiger
PostPosted: Wed Dec 10, 2008 2:31 pm    Post subject: Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

I still have the question: what the default transaction behaivor of a message flow? If I have a flow of MQInput->Compute1->MQOutput1->Compute2->MQOutput2. Both Failure and Catch terminal of MQInput1 node are wired to a failure queue (an MQOutput node).

If an error/exception occurred in Compute2, the message sent to MQOutput1 remains there. It looks like there is no transaction by default.

The transaction worked when I disconnected the Catch terminal of the MQInput1 node.

I tried to read the broker info centre and documents. It's still not very clear to me. Can anyone help explain for me?

Thanks in advance!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Dec 10, 2008 2:53 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you looked at the flow nodes under the construction tab?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Thu Dec 11, 2008 12:26 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

wildtiger wrote:
It looks like there is no transaction by default.


Transactional default is controlled by message persistance if you don't control it yourself.


_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 11, 2008 5:39 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Transaction control is handled by the Input node.

If the input node doesn't see an error, there is no rollback.
Back to top
View user's profile Send private message
wildtiger
PostPosted: Thu Dec 11, 2008 6:49 am    Post subject: Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

fjb_saper wrote:
Have you looked at the flow nodes under the construction tab?


Hi fjb_saper, I don't see a construction tab. Could you tell which node? I didn't selecct "Coordinated Transaction" option on the Configuration tab of the BAR.
Back to top
View user's profile Send private message
wildtiger
PostPosted: Thu Dec 11, 2008 6:52 am    Post subject: Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

Vitor wrote:
wildtiger wrote:
It looks like there is no transaction by default.


Transactional default is controlled by message persistance if you don't control it yourself.



Hi Victor, I've select the Transaction mode of the MQInput node to "Yes". According to the manual, the transaction enabled. My question is, do I have to select "Coordinated Transaction" option on the Configuration tab of the BAR? I tried this option, the result is message left in the MQInput queue not consumed.
Back to top
View user's profile Send private message
wildtiger
PostPosted: Thu Dec 11, 2008 6:54 am    Post subject: Reply with quote

Acolyte

Joined: 21 Apr 2002
Posts: 55
Location: Canada

mqjeff wrote:
Transaction control is handled by the Input node.

If the input node doesn't see an error, there is no rollback.


Hi mqjeff, what if there's an error further down the flow? should it be rolled back?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 11, 2008 7:19 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Please do your own homework.

How to handle errors in message flows is clearly documented in the Info Center.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/topic/com.ibm.etools.mft.doc/ac00410_.htm
Back to top
View user's profile Send private message
Luke
PostPosted: Thu Dec 11, 2008 9:17 am    Post subject: Reply with quote

Centurion

Joined: 10 Nov 2008
Posts: 128
Location: UK

I can kind of see why you might be confused by this though ...

Maybe it will be clearer if you try inserting a TryCatch node connected to the Out terminal of MQInput, leave the MQInput Catch terminal unconnected and connect the catch of the TryCatch node to MQ Output1, and the Try to Compute1.

This would get the same result as your initial setup, and for the same reason, but maybe it's a bit clearer?

You need to think a bit more about how Catch works when an exception is thrown ....
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 » Transaction Control in 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.