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 » Transactions within a Flow

Post new topic  Reply to topic
 Transactions within a Flow « View previous topic :: View next topic » 
Author Message
Gideon
PostPosted: Fri Oct 16, 2009 6:51 am    Post subject: Transactions within a Flow Reply with quote

Chevalier

Joined: 18 Aug 2009
Posts: 403

If I have a simple flow with a Single MQINput, connected to a single MQOutput (no other nodes in between)

I then send a SINGLE phase commit JMS message, set as Persistent Transacted

Does that flow perform 1 transaction or 2 ??

In other words, since I sent a single phase commit, doesn't that mean that the flow pulling off the message from MQInput is one transaction, and the flow PUTting on the message into the MQOutput node a separate transaction ?

Thanks
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Fri Oct 16, 2009 7:00 am    Post subject: Re: Transactions within a Flow Reply with quote

Grand High Poobah

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

Gideon wrote:
doesn't that mean that the flow pulling off the message from MQInput is one transaction, and the flow PUTting on the message into the MQOutput node a separate transaction ?



_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Gideon
PostPosted: Fri Oct 16, 2009 7:06 am    Post subject: Reply with quote

Chevalier

Joined: 18 Aug 2009
Posts: 403

I guess your saying that pulling from MQinput and putting to MQOutput is a single transaction.

If so, does this occur within a Single Phase commit or without a 2 phase commit ?

Thanks
Back to top
View user's profile Send private message Send e-mail
smdavies99
PostPosted: Fri Oct 16, 2009 7:19 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.

AFAIK, it is all one unit of work and a One Phase Commit scenario.

if the MQOutput fails, the transactions rolls back to a Try-Catch node or the MQInput Node Catch Terminal where if there is a custom error handler defined it is processed otherwise, it rolls back to the MQInput Failur Terminal. If nothing is connected to that then it rools back to the Backout Queue defined for the queue that the MQInput node is reading from.
The message is then deposited on the Backout queue.

So in your scenario you are doing nowt in the flow so the message will endup on the BackOut Q. (You do have one defined don't you?)
_________________
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
Vitor
PostPosted: Fri Oct 16, 2009 7:20 am    Post subject: Reply with quote

Grand High Poobah

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

Gideon wrote:
I guess your saying that pulling from MQinput and putting to MQOutput is a single transaction.




Gideon wrote:
If so, does this occur within a Single Phase commit or without a 2 phase commit ?


What, exactly, do you believe the broker would be doing a 2 phase commit with?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Gideon
PostPosted: Fri Oct 16, 2009 8:58 am    Post subject: Reply with quote

Chevalier

Joined: 18 Aug 2009
Posts: 403

smdavies99:

I get Vitor's point that there is no transcation manager avail for a 2 phase commit, but I usually see single phase commits as a write to a queue, within a unit of work.

Or I see a write to a queue within a unit of work.

But this scenario is a read and then a write.

What I don't understand is if the write to the MQOutput node fails (Q full for instance), is that still within a unit of work on a single phase.

(Yes, to your question on the backout queue)

Thanks
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Oct 16, 2009 10:06 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

The MQInput node can either start a transaction or not.

The MQOutput node can either participate in that transaction or not.

Oddly enough, IBM has given the choice in this to you.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 16, 2009 6:11 pm    Post subject: Reply with quote

Grand High Poobah

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

Gideon wrote:
usually see single phase commits as a write to a queue, within a unit of work.


You may usually see that, but there's nothing saying that has to be the case.

Gideon wrote:
What I don't understand is if the write to the MQOutput node fails (Q full for instance), is that still within a unit of work on a single phase.


Yes.

Gideon wrote:
(Yes, to your question on the backout queue)


Then why have additional processing to move the message on failure? Why not let WMB do it?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Fri Oct 16, 2009 10:49 pm    Post subject: Reply with quote

Jedi Council

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

Vitor,
I generally do have some Nodes/Esql attacted to at least one Catch Terminal in every flow.
However I also define a BackoutQ as somewhere for errant messages to be put if by some chance, the Node/Esql that is handling the exception fails OR some other failure happens.

Certainly if your Error Handling is up to scratch then nothing should appear in the BackoutQueues.
Certainly, if your Flow is coded properly then no messages should generate exceptions (in an ideal world)
But if everything fails (such as some idiot of a sysadmin (terry are you listening) takes down the App Database without stopping broker then ...
Well, you know what happens. In this case, everything ends up on the BackoutQ so nothing is lost or put on the DLQ. (The use of a DLQ is another can of worms that I'm not going to open today)
_________________
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
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Transactions within a 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.