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 » Question On WMB

Post new topic  Reply to topic
 Question On WMB « View previous topic :: View next topic » 
Author Message
ein
PostPosted: Thu Dec 30, 2010 2:52 am    Post subject: Question On WMB Reply with quote

Centurion

Joined: 14 Mar 2009
Posts: 108

Hi Guys,

I have question and confusion.

I designed a flow like

MQInput----> Compute ---- MQOutput ---> Database to update.

My requirement is ,In case database fails , the the message should roll bak.
But the problem i ma facing is , The messag is getting roll back as well as the message has placed In Q[Mqoutput Node]. I need to avoid this .
So i changed MQoutput node properties transcion mode as No.
But no use.

Can any one tell me what i missed . Or do i need any Q properties.

Thanks All You guys in advance.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 30, 2010 2:58 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Normally you don't want the output message to be committed if the transaction rolls back.

If you do, then set the transaction mode on the MQoutput node to No.
Back to top
View user's profile Send private message
ein
PostPosted: Thu Dec 30, 2010 2:59 am    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2009
Posts: 108

Hi Zpat,

I did the same , But no use.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 30, 2010 3:23 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

OK, so the flow has failed before it reached the MQOutput node.

You have to connect the MQoutput via a try-catch terminal, so that it is executed even if an error has occured in the compute node.

Or handle the error in the compute node so it doesn't rollback.
Back to top
View user's profile Send private message
ein
PostPosted: Thu Dec 30, 2010 3:44 am    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2009
Posts: 108

This is My flow Zpat,

Mqinput ------> Compute Node ----> MqOutput Node -----> Database to update my transaction status.


1. MqInput receives a message and it sends to Compute node to perform the operations. And the catch terminal of the Mqinput node is connected to
My error handling flow.

2.Compute node send the information to MQoutptunode .

3. MQoutput node out terminal is connected to my DB flow which will update transaction status.

Properties:Transaction Mode : No.
Persistence : Yes

My problem is. My DB flows due to some error. so the Message flow should not commit.
But i am not sure , My flow is putting the message in Q[MQoutput]. even failures of DB.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 30, 2010 3:56 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Do you want it to produce the message or not in this case?

Try using the debugger to see what the flow of control is.
Back to top
View user's profile Send private message
ein
PostPosted: Thu Dec 30, 2010 3:59 am    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2009
Posts: 108

yes .
I don't want a produce a message.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 30, 2010 4:39 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Then set transaction mode to Yes, or automatic on MQOutput.
Back to top
View user's profile Send private message
ein
PostPosted: Thu Dec 30, 2010 8:00 am    Post subject: Reply with quote

Centurion

Joined: 14 Mar 2009
Posts: 108

I tried this options also,
But no use. still the message in Q.
Back to top
View user's profile Send private message
zpat
PostPosted: Thu Dec 30, 2010 8:52 am    Post subject: Reply with quote

Jedi Council

Joined: 19 May 2001
Posts: 5866
Location: UK

Is the input message persistent or non-persistent?

Transaction mode Auto means transactional mode = Yes for Persistent and No for non-persistent.
Back to top
View user's profile Send private message
optimist
PostPosted: Fri Dec 31, 2010 5:54 am    Post subject: Works as designed... Reply with quote

Apprentice

Joined: 18 Nov 2010
Posts: 33

Your message flow works as designed.

Once you commit a message on to a Queue (MQOutout Node), the transaction scope ends. So, the flow that picks up the message from the queue (which it can only do so if the message on to the queue was committed & not under syncpoint) cannot be part of the original transaction. The behavior you see is per design of MQ.

In general, one uses the flow you have for near real-time updates where the downstream application (a database in your case) may or may not be available AND you'll want to perform the updates when the application comes back online.

You have a slighlty different use case here. Assuming you still need a message on the MQOutput queue for a successful database update, you will have to change your flow to perform the db update within your ESQL (or by invoking your flow that updates the db) before putting a message on the output queue.

HTH.
--optimist
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 » Question On WMB
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.