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 » Input node - Failure & Catch, TryCatch node, & Throw

Post new topic  Reply to topic
 Input node - Failure & Catch, TryCatch node, & Throw « View previous topic :: View next topic » 
Author Message
lung
PostPosted: Wed Oct 02, 2002 5:05 pm    Post subject: Input node - Failure & Catch, TryCatch node, & Throw Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

I have a question regarding the failure and catch terminals of the input node. From my understanding, whenever an exception occurs in the later nodes, the message will be rollbacked to the input node. If the failure terminal is connected, the message will be routed there. Else, if the catch terminal is connected, the message will be routed there instead. The difference is that message routed through the failure terminal will consist of the original message as if just taken from the input queue. If it's routed through the catch terminal, it will consist of the original message AND an exception list. Am I correct here... Please correct me if I'm wrong. So is this all the difference between the failure & catch terminals of an input node?

I would also like to enquire on how the trycatch and throw nodes work... Please give examples if possible

Thanks!
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
kirani
PostPosted: Thu Oct 03, 2002 8:07 am    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

Lung,

I will first explain how the message is handled in case of failure using this message flow ..

MQInput(out)->Compute1->MQOutput1

If an error is thrown by any node (Compute1 or MQOutput1) in your message flow, and if you don't have any TryCatch node in between your MQInput node and other nodes, the message is rolledback to MQInput node, it then propagates to the nodes connected to Catch terminal of MQInput node.

If the catch terminal is not connected, and the message is processed under Transactional control, the message will be put back on the input queue. The MQInput node will read this message again to "retry" the processing. If the backout count at this statge is greated than backout threshold, the message will be propagated to the failure terminal of MQInput node.

If the failure terminal is not connected, the message is put back on the Backout queue, if one is defined for this input queue. If the backout queue is not defined the message will be sent to queue managers DLQ. If there is no DLQ defined for this queue manager, the message remains in the input queue.



Throw node is used to throw an exception, for example you can attach a Throw node to throw an exception if the condition results into FALSE. In this case, you would attach Throw node to the false terminal of your filter node.

Try-catch node is same as try-catch block in any proramming language. It has two output terminals named try and catch. If an error occurs while processing message in your try terminal, message will be rolledback to TryCatch node, it will then propagate to catch terminal.

For more information on these nodes please refer to help text in the Control Center.
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
gopiv
PostPosted: Thu Oct 03, 2002 12:04 pm    Post subject: Reply with quote

Newbie

Joined: 29 Sep 2002
Posts: 8

Kirani,
I have tried connecting catch terminal of input node if there are any exceptions in the flow for transactional processing. I am able to catch the exception in catch terminal but not the message and exceptionlist.
I have read many posts saying that we can get the messagre and exceptionlist into some error queue by connecting the catch terminal of input node in the transactional processing.
Can you explain how we can get the message and exceptionslist in catch terminal.
Thanks,
Gopiv
Back to top
View user's profile Send private message
lung
PostPosted: Thu Oct 03, 2002 5:08 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

Thanks, Kiran! That's a very helpful explaination

Gopiv, make sure your compute mode in your compute node includes Exception. If you use the message flow debugger, your message will not be re-generated until it reaches the catch terminal of your input node (you will only see exception). After it goes thru the catch terminal, you can then see your message together with the exceptionlist. If there's an output node from the catch terminal, you should be able to see your message in the output queue.
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
MVO
PostPosted: Thu Oct 17, 2002 7:15 am    Post subject: Reply with quote

Centurion

Joined: 09 Sep 2001
Posts: 131

Hi,

If I have a try-catch node in the main message flow such as:
MQInput >> TryCatch >> other nodes >> subflow1

do I also need to have Try-Catch logic in subflow1, ot if there're any exception in subflow1, MQSI will go back to MQInput and proceed the first Try-Catch node logic ?

Thanks
Back to top
View user's profile Send private message
lung
PostPosted: Thu Oct 17, 2002 5:14 pm    Post subject: Reply with quote

Master

Joined: 27 Aug 2002
Posts: 291
Location: Malaysia

MVO,

Why would u want to wire a TryCatch node just after the MQInput node? You can just use the catch terminal of the MQInput node!

To answer your question, if you have a TryCatch node in your subflow, then the exception will be rolled back to that TryCatch node, else it will roll back to the TryCatch node in your main message flow.
_________________
lung
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Input node - Failure & Catch, TryCatch node, & Throw
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.