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 » Qeury on Failure behaviour of MQ Get Node

Post new topic  Reply to topic
 Qeury on Failure behaviour of MQ Get Node « View previous topic :: View next topic » 
Author Message
jbanoop
PostPosted: Sat Jun 17, 2006 3:32 am    Post subject: Qeury on Failure behaviour of MQ Get Node Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Hi,
My understanding is that the failure terminal of any node is for handling of any error internal to the node (except in the case of MQ Input node). For catching any exceptions that are thrown beyond the node, the catch terminal (if available) should be used.
However While testing some conditions with MQ Get node, I have noticed that if an exception happens beyond the MQ get node and is being thrown back to the MQ Get node, it is caught by the Failure terminal of the MQ get and propagated on that path.
Is this intended behaviour of MQ Get or should it just propogate the exception further back instad of catching it on the failure termial. The flow i have used is MQ Input --> MQ Output -->MQ Get --> compute --> throw.

The configuration is MB 6 (fix pack 1 for both runtime and toolkit installed).


Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Sat Jun 17, 2006 3:46 am    Post subject: Re: Qeury on Failure behaviour of MQ Get Node Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi jbanoop,
jbanoop wrote:
Hi,
My understanding is that the failure terminal of any node is for handling of any error internal to the node (except in the case of MQ Input node). For catching any exceptions that are thrown beyond the node, the catch terminal (if available) should be used.

This understanding is wrong...when the failed message moves backwards it can be caught at the compute's or, mqGet's, or Output's or input's failure terminal....if you connect the failure of compute u can get the message there else have it move as far back as u want....i'm not very sure, but i suppose this is becoz of the type of transactional commit required by you.

jbanoop wrote:
However While testing some conditions with MQ Get node, I have noticed that if an exception happens beyond the MQ get node and is being thrown back to the MQ Get node, it is caught by the Failure terminal of the MQ get and propagated on that path.

Don't connect the failure terminal and see it going backwards...the message will stop going back wherever u connect the failure terminal.

Regards.
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Sat Jun 17, 2006 4:52 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Hi Elvis_gn,
Are you sure ? I tried with a flow which had MQ Input --> compute --> throw . I had the failure of compute wired to an MQ output.
So as per your explaination, the output should come on the the MQ output attached to the fail terminal of compute. however the message is getting backed out to MQ Input. So I feel that my understanding on that is correct and by default failure does not trap an exception that is on its way back being propagated.
As for MQ Get I am not sure.
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
jefflowrey
PostPosted: Sat Jun 17, 2006 5:19 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

When a node that has a failure terminal detects an internal error, it propagates the message to that terminal.

My emphasis.

Elvis_gn, you should know this stuff!
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Sat Jun 17, 2006 5:30 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

But jeff, what about my initial question about MQ get ? It seems to be trapping the exception which is occuring beyond it (which is being propagated back) on the fail terminal.
Is this the behaviour of MQ get or am I missing something here ?
Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Sat Jun 17, 2006 4:49 pm    Post subject: Reply with quote

Grand High Poobah

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

This is standard behavior.
If an exception is thrown through code the path switches to the first failure/catch terminal connected on the any of the Previous nodes in the path.

If no failure terminal is connected you will see it on the input node. In debug you see an extra step with the node marked with a red exlamation point.

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Sat Jun 17, 2006 11:20 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi guys,
jefflowrey wrote:

Elvis_gn, you should know this stuff!

Thats my third....i'm still learning

fjb_saper wrote:
If an exception is thrown through code the path switches to the first failure/catch terminal connected on the any of the Previous nodes in the path.

Isn't this what I meant...

I am still confused how transactions will be rolled back and in other cases retained when i'm returning all the way to the MQInput...will Try Catch be needed for such cases...if i made an intermediate MQOutput, how can I roll that back...

Regards.
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Sat Jun 17, 2006 11:45 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

Hi Fjb_saper,
Quote:
If an exception is thrown through code the path switches to the first failure/catch terminal connected on the any of the Previous nodes in the path.


This seems to be the behaviour for Mq input but say for a compute node with its fail terminal connected, it does not catch an exception which was generated beyond it and is in the process of being propagated back.

Elvis_gn,
Quote:
if i made an intermediate MQOutput, how can I roll that back..

for rolling back an MQ output node operation, i guess the default setting of the transaction property makes sure that the put is also rolled back if the flow rolls back. For using MQ get we have set the transaction attribute to no so that the service on the other side would be able to pick up the put message.
My understanding is that if an exception occurs and the flow proceeds on any error handling flow then the transaction would stand comiited (unless an exception happens within the error handling flow)
Correct me if i am wrong.
Regards,
Anoop
Back to top
View user's profile Send private message Yahoo Messenger
elvis_gn
PostPosted: Sun Jun 18, 2006 12:39 am    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi,
jbanoop wrote:

My understanding is that if an exception occurs and the flow proceeds on any error handling flow then the transaction would stand comiited (unless an exception happens within the error handling flow)
Correct me if i am wrong

Correct you, I am myself all confused now...

Yes, i suppose if the flow goes to an error handling through failure also, the transaction would remain committed, unless the transaction mode is set for rollback in the nodes...

Jeff please respond....

Regards.
Back to top
View user's profile Send private message Send e-mail
jefflowrey
PostPosted: Sun Jun 18, 2006 6:23 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Okay, the second link I posted explains it.

Failures do propagate to the "nearest" connected failure terminal. This is why if you want to catch errors at the input node, you need to ensure that no failure terminals are connected anywhere else, or that you rethrow exceptions out of the failure terminal flow.

I can't really explain why Anoop's simple test didn't work.

In general, error handling in Broker is not as straight forward as it seems. I believe there are some developerWorks articles on the subject.
_________________
I am *not* the model of the modern major general.
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 » Qeury on Failure behaviour of MQ Get Node
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.