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 » Handling Errors with MB

Post new topic  Reply to topic
 Handling Errors with MB « View previous topic :: View next topic » 
Author Message
fabyos
PostPosted: Tue Jun 16, 2009 1:35 pm    Post subject: Handling Errors with MB Reply with quote

Apprentice

Joined: 15 May 2009
Posts: 37

Hi,

I'm thinking about in how to deal with different types of errors/exception.

I've a compute node and want to perform a different action based on error/exception. I have messages that comes from MQ Input node, and if some error occur the input message is 'rollback' and go to the appropriate message queue.

For example, a database error connection the input message should go to a FAIL queue. But a parsing erro should go to a ERROR queue.

How can I do this? The catch nodes arent based on type of exception (parser, recoverable, database and etc). Am I missing something?

I'm currently planning on use the Out'n' output from compute node to route the differente kinds of error, and exceptions catch only FAILs. However, parsing errors goes to FAIL queue, which I wont.
Back to top
View user's profile Send private message
harish_td
PostPosted: Tue Jun 16, 2009 6:12 pm    Post subject: Reply with quote

Master

Joined: 13 Feb 2006
Posts: 236

Error handling is a unique requirement which is business and site specific.
There is no "one size fits all" error handling.
For starters look at the Help --> Samples Gallery --> Application Samples --> Message Broker --> Error Handler
Back to top
View user's profile Send private message Yahoo Messenger
MQEnthu
PostPosted: Tue Jun 16, 2009 8:29 pm    Post subject: Reply with quote

Partisan

Joined: 06 Oct 2008
Posts: 329
Location: India

fabyos wrote:
For example, a database error connection the input message should go to a FAIL queue. But a parsing erro should go to a ERROR queue.


Why do you need this?? There can be n types of exceptions/errors..will you have n number of queues??

If your intention is to record the exception/error somewhere, there are many ways to do that. Go through the Info center/sample gallery.
_________________
-----------------------------------------------
It is good to remember the past,
but don't let past capture your future
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jun 16, 2009 11:41 pm    Post subject: Re: Handling Errors with MB Reply with quote

Grand High Poobah

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

fabyos wrote:
How can I do this? The catch nodes arent based on type of exception (parser, recoverable, database and etc). Am I missing something?


Wire the catch terminal to a compute node, which parses the Exception list tree and routes the message as you require. Do not forget to include handling for errors you do not specifically handle.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Wed Jun 17, 2009 1:04 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Remember that for Database errors, you can disable the automatic exception throwing is a Compute (& other) node and then handle the detection and subsequent throwing of such errors in ESQL. For example, you may do an insert into a table and you don;t care if there is already a primary key with the same values as the one you are trying to insert. In this case you can manually detect the error code and only throw an exception if it is some other error.

Also, I like to handle all DB errors this way. I can add the actual command that I was trying to perform to the error data (held in Environment...) so that any reporting has more than the bare information from the exceptionList.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
fabyos
PostPosted: Wed Jun 17, 2009 5:08 am    Post subject: Reply with quote

Apprentice

Joined: 15 May 2009
Posts: 37

Unfortunatelly I cant catch the exception throwed by node because I have a compute node that does to much thing (if i could I`d separate it).

THe compute node verifies the input message, then it calls a procedure based on the input information. The procedure could fail due to a connection problem, for example, or the data passed is invalid or has a problem, so a diferente type of handle must be done. Secondly, I receive a XML output from procedure call, and it must be parsed in order to remove some nodes.

So the XML could be wrong, so I have to take a different action.

Actually, there is only two queues, and I dont wanna have one queue for each type of exception. I just wanna filter some when possible, and let the other be caught as normally.

I didnt tried the options yet. This post is just to clear my situation.
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 » Handling Errors with MB
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.