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 » Multiphase Commit » 2PC?

Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4
 2PC? « View previous topic :: View next topic » 
Author Message
bruce2359
PostPosted: Thu May 07, 2009 2:30 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Quote:
If I am able to get the message, can I also perform some business logic then Put the message do a Commit then allow quiescing?

Back to the manuals. Read about FAIL_IF_QUIESCING.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 08, 2009 12:14 am    Post subject: Re: 2PC? Reply with quote

Grand High Poobah

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

jeremydp wrote:
While I have read the MQGET with respect to the the Syncpoint and Fail_If_Quiescing options I did not read the order of operations.


You should read about the other calls on a quiesce as well.

jeremydp wrote:
If I am able to get the message, can I also perform some business logic then Put the message do a Commit then allow quiescing?


You really need to stop trying to fix problems WMQ fixes for you.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 08, 2009 5:18 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Quote:
then allow quiescing?

Your application will likely be the victim of quiescing.

The system admin decides how and when to quiece the qmgr. You need to read the WMQ System Administration manual for the endmqm control command.

Endmqm offers three major flavors: the system admin could let all currentl MQCONNected applications execute until they MQDISConnect (the -c option); or allow all current MQI calls to complete, but NO new MQI calls (-i option); or end the qmgr preemptively (-p option).

If the app has coded _FAIL_IF_QUIESCING, then the app will discover that the qmgr is ending, and take the opportunity to backout or cmit before the qmgr ends.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri May 08, 2009 5:32 am    Post subject: Reply with quote

Grand High Poobah

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

bruce2359 wrote:
Quote:
then allow quiescing?

Your application will likely be the victim of quiescing.


This is actually a good point I missed in the original post (I'm not doing so well with this today - I think the batteries in my glasses must be running down). You don't allow quiescing of a queue manager any more than you allow a DBA to shutdown a database. The reason code is to allow your application to finish what it's doing and close gracefully.

You will notice (when you read up on endmqm as suggested by my esteemed associate) that by default endmqm causes the queue manager to wait for all applications to disconnect before closing. You may then think "but why are they saying I can't allow the queue manager to quiesce?"

Three points:

- As previously stated the admin can reissue an immediate closedown which will bring the queue manager down on top of your application
- Causing the admin to have to do this is likely to result in a tersely worded email
- Causing the admin to be woken at 3am to do this because your app hung and the endmqm was in a script is likely to result in a very unpleasant experience the following morning.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Fri May 08, 2009 7:08 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

You guys... Trust me I have been reading in the manuals. But I find them to not contain a lot of depth. That being said, it is putting all of the little pieces together to get the full answer.

It seems I was spending my time looking at the programmer sections of the manual. In these sections it says if the QMgr is quiescing, all calls will fail.

However in the Sys Admin section it basically says that the application can continue until it disconnects. Granted, to your point, if the application doesn't disconnect in a reasonable amount of time the SysAdmin might get a call at 3am and force the QMgr to stop. And nobody wants this.

So my question is if the QMgr is quiescing and my Get/Put calls return a Failed completion code, do I still Get/Put the message from/on the queue?

Thanks!
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 08, 2009 7:14 am    Post subject: Re: 2PC? Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jeremydp wrote:
So my question is if the QMgr is quiescing and my Get/Put calls return a Failed completion code, do I still Get/Put the message from/on the queue?


No.

That's what a Failed completion code means. That the call Failed to complete.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 08, 2009 7:17 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Quote:
So my question is if the QMgr is quiescing and my Get/Put calls return a Failed completion code, do I still Get/Put the message from/on the queue?

No. MQCC_FAILED means that the call was failed.
Quote:
But I find them (the manuals) to not contain a lot of depth.

WMQ is a sub-system, not an application program. A sub-system offers o/s-like facilities. Sub-systems are enormously complicated. There are many manuals, some are platform-specific, others are cross-platform.

Your lack of understanding of the product is at issue here.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Fri May 08, 2009 7:29 am    Post subject: Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

bruce2359 wrote:

Your lack of understanding of the product is at issue here.


Yes, this is certainly a big factor!

I don't want to make you Sys Admin cringe, but what if I do not use the Fail_If_Quiescing option and perform Gets/Puts and only check for quiescing every 5 minutes?
Back to top
View user's profile Send private message
bruce2359
PostPosted: Fri May 08, 2009 7:58 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Quote:
... but what if I do not use the Fail_If_Quiescing option and perform Gets/Puts and only check for quiescing every 5 minutes?

You are not obligated (except by best-practice) to take advantage of _FAIL_IF_QUIESCING.

If you don't code it, your app will fail when the sysadmin ends the qmgr. If you do code it, your app will fail one way or the other when the sysadmin ends the qmgr. With endmqm, the qmgr always ends gracefully. It's your app that fails.

A brief restatement: endmqm ends the qmgr, NOT your applications.

What all this means is that at the qmgr at restart will backout all incomplete UofWs. This is discussed at length in the WMQ System Admin manual.

How do you intend to check every 5 minutes? Put your app to sleep based on a timer? What happens if the sysadmin ends the qmgr during rest period? What if the sysadmin just reboots or pulls the power-cord out of the back? How will you code for these conditions?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
jeremydp
PostPosted: Fri May 08, 2009 10:46 am    Post subject: Re: 2PC? Reply with quote

Novice

Joined: 28 Apr 2009
Posts: 20

[quote="bruce2359
A brief restatement: endmqm ends the qmgr, NOT your applications.
[/quote]

Thank you, that is how I understood it. That it only relates to the QMgr. But thank you for the clarification.

I finally think I am out of questions.


THANK YOU everyone for you input!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3, 4 Page 4 of 4

MQSeries.net Forum Index » Multiphase Commit » 2PC?
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.