Author |
Message
|
sebastia |
Posted: Wed May 16, 2007 4:19 am Post subject: (local) QM is Transaction Manager, DB2 is on remote QM |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
I dont understand what is exchanged on this situation :
On QM1, we have application APP1 that does
1.- MQ_Begin()
2.- MQ_Put() + MQPMO_SYNCPOINT
3.- MQ_Get()
and then MQ_Commit() or MQ_CMIT() or MQ_BACK() depending on what is received at stage "3"
Data we send in "2" MQ_Put() goes to another QM2, where application APP2 writes it into a Database (not commited yet).
Lets supose APP2 writes well to DB2, so it sends an "OK" to QM1, so APP1 does a MQ_CMIT().
My question is :
what kind of info is sent from QM1 to QM2
so DB on site "2" is COMMITED ?
I mean, using what channel, what queue .... any info or pointer.
Thanks. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 16, 2007 4:32 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Nothing goes to QM2 until the PUT is committed. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 4:41 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Thanks, Jeff - I understand nothig happens until a MQ_Commit() is called on QM1.
But I also said ...
"Lets supose APP2 writes well to DB2,
so it sends an "OK" to QM1,
so APP1 does a MQ_CMIT()." <<<<<<<<<<<<<<<<<<<<<<<
In that moment, WHAT IS SENT FROM QM1 to QM2 ???
S. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 16, 2007 5:24 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Nothing.
There is no XA between these two systems. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 5:31 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Sorry, Jeff - I dont understand what you mean.
APP1 MQ_Commit() can produce a DB2 Commit() on QM2 system or not ?
S. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 16, 2007 5:49 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
No.
You can not, without buying an external transaction coordination system (not MQ, not DB2), ever achieve this kind of XA between two queue managers.
MQ out of the box will only support single-phase and two-phase transactions, not multi-phase cross system transactions. _________________ I am *not* the model of the modern major general.
Last edited by jefflowrey on Wed May 16, 2007 5:55 am; edited 1 time in total |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 5:51 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
sebastia wrote: |
APP1 MQ_Commit() can produce a DB2 Commit() on QM2 system or not ?
|
You need to have both MQ and DB2 participating in an XA transaction for this to happen, which is no small task & potentially requires additional software (ETC, app server, etc ). _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 5:58 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
So, what is the meaning of this sentence (System Admin, chap 11)
+++++++++++++++++++++++++++++++++++++++
Global units of work
Are those in which other resources, such as tables in a relational database, are also updated. When more than one resource manager is involved, there is a need for transaction manager software that uses a two-phase commit process to coordinate the global unit of work.
We define two scenarios for global units of work:
1. In the first, the queue manager itself acts as the transaction manager. In this scenario, MQI verbs control the global units of work; they are started in applications using the MQBEGIN verb and then committed using MQCMIT or backed out using MQBACK.
+++++++++++++++++++++++++++++++++++++++
Those lines talk about "local" databases, then ? |
|
Back to top |
|
 |
Vitor |
Posted: Wed May 16, 2007 6:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
These lines talk about databases which have been configured to participate in an XA transaction which the queue manager has been configured to coordinate. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
jefflowrey |
Posted: Wed May 16, 2007 6:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
You're talking about TWO queue managers.
MQ does no transaction coordination between more than ONE queue manager.
A single qmgr can coordinate a transaction between ITSELF and any number of local or remote databases - assuming that the database is supported and the necessary configuration is done to establish XA coordination with that database.
A single qmgr can not coordinate any transactions with ANOTHER qmgr.
Is that clear enough? _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
sebastia |
Posted: Wed May 16, 2007 6:19 am Post subject: |
|
|
 Grand Master
Joined: 07 Oct 2004 Posts: 1003
|
Yes, Jeff - your sentence it is clear enough.
Not with more than one queue manager.
Full stop.
I do appreciate your time and patience, both.
S. |
|
Back to top |
|
 |
|