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 » Getting message to ROLLBACK after MQOutput Node in WMB V6.1

Post new topic  Reply to topic
 Getting message to ROLLBACK after MQOutput Node in WMB V6.1 « View previous topic :: View next topic » 
Author Message
Dennis
PostPosted: Fri Jul 30, 2010 5:14 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V6.1 Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

I am trying to create a flow in WMB V6.1 that does the following:

1) MQInput Node with settings of Transaction=Yes. Failure terminal on MQInput node connect to an MQOutput node with a queue name of Queue1

Out terminal connects to Compute node---- setting of Transaction=Automatic and Throw exception on Database error is checked

2) Compute node builds an output message

Out terminal connects to MQOutput node---- with queue name of Queue2

Out terminal on MQOutput node connects to another Compute node

3) Compute node does some database work ---- setting of Transaction=Automatic and Throw exception on Database error is checked

When I am getting a database error my input message is showing up on the Queue1 but my output message from step 2 is also showing up on Queue 2. I want Queue2 message to be backed off and not show up.
Back to top
View user's profile Send private message
bhumulas
PostPosted: Fri Jul 30, 2010 9:58 am    Post subject: Reply with quote

Apprentice

Joined: 17 Feb 2006
Posts: 41

Make sure Transaction Mode on output node is Automatic.
Back to top
View user's profile Send private message
hellobond070
PostPosted: Fri Jul 30, 2010 7:35 pm    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

Dennis,

You are trying to say that when one input message is fed to the flow, you get one message in fail queue through the failure terminal of the first MQ input node and another in the output queue in the MQ output node i.e. one input but two outputs ???

Is there a need in you design to have a MQoutput node in the second step. Why can't you directly wire the out of the compute node to either another compute node which does the database talking or have all in just one compute node instead of having two.
Back to top
View user's profile Send private message
Dennis
PostPosted: Mon Aug 02, 2010 4:24 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V6.1 Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

Yes on the MQOutput node transaction is set to automatic.

When a database failure occurs the origianl input message shows up on my failure queue (Queue2) like I would expect but also my new built message is showing up on Queue 1 which I want to have backed off.
Back to top
View user's profile Send private message
gregop
PostPosted: Mon Aug 02, 2010 5:36 am    Post subject: Reply with quote

Voyager

Joined: 24 Nov 2006
Posts: 81

Is your message non-persistent?
Back to top
View user's profile Send private message
Dennis
PostPosted: Mon Aug 02, 2010 5:37 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V6.1 Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

No. It is persistent
Back to top
View user's profile Send private message
hellobond070
PostPosted: Mon Aug 02, 2010 6:57 am    Post subject: Reply with quote

Centurion

Joined: 18 Nov 2009
Posts: 118

I would suggest not using the MQ output node which should resolve the issue
Back to top
View user's profile Send private message
Dennis
PostPosted: Mon Aug 02, 2010 7:08 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V6.1 Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

But if I do not use the MQoutput Node how do I get the message to go to my Queue 2 when there is no database failure like I want
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Aug 02, 2010 7:34 am    Post subject: Re: Getting message to ROLLBACK after MQOutput Node in WMB V Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Dennis wrote:
But if I do not use the MQoutput Node how do I get the message to go to my Queue 2 when there is no database failure like I want


I guess this is ur flow design,

MQInput --> Compute -->MQOutput --> Compute
|
|___ MQOutput (Failure)

Cant you have the DB operation performed in the first compute node and in case of Success, propagate to MQOutput, else Throw a User exception and return False.

Another solution with ur design would be to Throw a User exception in Case of DB error and that would roll back the message from MQOutput and does not commit it.
Back to top
View user's profile Send private message Send e-mail
Dennis
PostPosted: Mon Aug 02, 2010 7:39 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

In my design the Database needs to happen after the MQput. I have tried throwing a user exception via the THROW USER EXCEPTION syntax like this and the message still shows up and does not get rolled back

THROW USER EXCEPTION CATALOG 'WMBv6' MESSAGE 2950 VALUES(
'XCP_TYPE{Server}',
'XCP_FAULTCODE{BackendProcessFailure}',
'XCP_FAULTSTRING{Failed Call to Backend Resource}',
'XCP_FAULTACTOR{com.hli.icc.businesscommon.disclaimerservice.v200.process.AddDisclaimer_DAO}',
'XCP_ERRORMSG{' || SQLERRORTEXT || '}',
'XCP_ERRORDTL{SQLSTATE=' || CAST(SQLSTATE AS CHARACTER Encoding inEncoding) || ',SQLCODE=' || CAST(SQLCODE AS CHARACTER Encoding inEncoding) || ',SQLNATIVEERROR=' || CAST(SQLNATIVEERROR AS CHARACTER Encoding inEncoding) || ',SQL Call=' || sql || '}');
Back to top
View user's profile Send private message
kash3338
PostPosted: Mon Aug 02, 2010 7:47 am    Post subject: Re: Getting message to ROLLBACK after MQOutput Node in WMB V Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

Dennis wrote:
In my design the Database needs to happen after the MQput. I have tried throwing a user exception via the THROW USER EXCEPTION syntax like this and the message still shows up and does not get rolled back.


Why have you conncted the Failure terminal of MQInput node? When you throw a User exception, the exception is caught at the Catch terminal of the Input node, when the failure terminals are not connected. Try connecting the to Catch terminal.
Back to top
View user's profile Send private message Send e-mail
Dennis
PostPosted: Mon Aug 02, 2010 8:01 am    Post subject: Getting message to ROLLBACK after MQOutput Node in WMB V Reply with quote

Apprentice

Joined: 04 May 2010
Posts: 29

my message still shows up on Queue 2 if I thro a user exception and the failure terminal of the MQinput node is not attached to anything and the catch terminal is
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 02, 2010 11:43 am    Post subject: Re: Getting message to ROLLBACK after MQOutput Node in WMB V Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Dennis wrote:
the catch terminal is

You need to end your catch terminal logic with a Throw node or a throw statement of some kind in order to allow the exception to be processed by the input node, which will then handle rollbacks.
Back to top
View user's profile Send private message
Amitha
PostPosted: Mon Aug 02, 2010 12:43 pm    Post subject: Reply with quote

Voyager

Joined: 20 Nov 2009
Posts: 80
Location: Newyork

As mqjeff suggested, since you have connected catch terminal your flow after catch terminal is responsible for handling the failure. Hence you have to include Throw node for broker to rollback the error. If you don't connect the Catch terminal broker automatically roll backs the error.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Getting message to ROLLBACK after MQOutput Node in WMB V6.1
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.