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 » General IBM MQ Support » Transaction manager configuration

Post new topic  Reply to topic
 Transaction manager configuration « View previous topic :: View next topic » 
Author Message
sebastia
PostPosted: Tue Dec 16, 2008 8:19 am    Post subject: Transaction manager configuration Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I am trying to use MQ to coordinate
a MQ_PUT() and DB2_INSERT_TABLE() operations,
using MQ as transaction Manager.

I am reading

1) mq v6 sys admin guide, chapter 11, "Transactional support"
2) mq v6 app programming guide, chapter 13, "commit ... uow"
3) mq v6 app prog ref, chapter 3, "MQBO options"

And here is the phrase / job to do
I dont understand how to do : (from [2], pg 176)

"When you use MQBEGIN to start a global unit of work, all the external resource managers that have been configured with the queue manager are included"

Well - the question is simple :
how do I tell MQ what external resource managers do I have ?
In my case, it is a DB2 Resource Manager, AFAIK.

Thanks for any pointer. Seb
Back to top
View user's profile Send private message Visit poster's website
sebastia
PostPosted: Tue Dec 16, 2008 8:40 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

mq v6 Sys Admin Guide page 175 :

In general, a global unit of work is implemented in an application
by the following method (in pseudocode):

MQBEGIN
MQGET (include the flag MQGMO_SYNCPOINT in the message options)
MQPUT (include the flag MQPMO_SYNCPOINT in the message options)
SQL INSERT
MQCMIT

At what moment do we declare what DB2 table or resource
has to be Committed ???

I have seen a small lite : "SWITCH FILES" ...
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Dec 16, 2008 8:48 am    Post subject: Reply with quote

Grand High Poobah

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

You need to configure the queue manager to participate in an XA group with an XA coordinator. This configuration is performed using the switch files you mention. DB2 must be configured to use the same coordinator.

Once this has been achieved, committing the UOW will commit all the resources thus controlled, both WMQ & DB2.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Dec 16, 2008 8:55 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

I am reading the MQ configuration, this is the switch file

How is DB2 notified it is part of XA ?
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Dec 16, 2008 8:58 am    Post subject: Reply with quote

Grand High Poobah

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

sebastia wrote:
How is DB2 notified it is part of XA ?


I've no idea. Ask Mr Google or post on a DB2 forum.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
sebastia
PostPosted: Tue Dec 16, 2008 9:55 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

Thanks, Vitor.

I'll stay with "mq v6 Sys Admin Guide", chapter 11.

Now I am at "Changing DB2 configuration parameters"

>>>
For each DB2 database that the queue manager is coordinating, you need to:
etc etc

()
Back to top
View user's profile Send private message Visit poster's website
Vitor
PostPosted: Tue Dec 16, 2008 11:04 am    Post subject: Reply with quote

Grand High Poobah

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

sebastia wrote:
Now I am at "Changing DB2 configuration parameters"


Ok, that'd probably work ok as well.....
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mvic
PostPosted: Wed Dec 17, 2008 3:55 pm    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

sebastia wrote:
How is DB2 notified it is part of XA ?

Best to ask on a DB2 forum, but here's my idea of what happens:

- During the first MQBEGIN, the MQ library code in the app makes an xa_open call into DB2.
- DB2 creates an "XA connection" as part of this xa_open.
- <<I don't think they would call it that, but let's call it that.>>
- XA connections are bound to the current OS thread.
- When you call SQLConnect(NULL,NULL) or similar, you get a DB2 handle for that XA connection.
- So now you have an MQ handle, and a DB2 handle (with its underlying XA connection that was created by the first MQBEGIN) both bound to the current thread.

Hopefully this answers the question.

Hopefully it is also correct - as I mentioned, though, please ask on a DB2 forum to find the DB2 experts.
Back to top
View user's profile Send private message
sebastia
PostPosted: Thu Dec 18, 2008 12:48 am    Post subject: Reply with quote

Grand Master

Joined: 07 Oct 2004
Posts: 1003

OK - thanks a lot.
I guess it is time to run some testing ...
Cheers !
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » Transaction manager configuration
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.