4.3.3 Propagating the Transaction
When the sending transaction manager receives the export message from the sending application, the transaction manager attempts to propagate the transaction to the receiving transaction manager. If a transport session has not yet been established, the sending transaction manager attempts to establish the session now.
After a transport session is established between the sending transaction manager and the receiving transaction manager and resources are negotiated, the sending transaction manager initiates a CONNTYPE_PARTNERTM_PROPAGATE connection with the receiving transaction manager.
CONNTYPE_PARTNERTM_PROPAGATE: The packet sequence starts when the sending transaction manager initiates a CONNTYPE_PARTNERTM_PROPAGATE connection with the receiving transaction manager.
Field |
Value |
Value description |
---|---|---|
MsgTag |
0x00000005 |
MTAG_CONNECTION_REQ |
fIsMaster |
0x00000001 |
1 |
dwConnectionId |
0x00000001 |
1 |
dwUserMsgType |
0x00000101 |
CONNTYPE_PARTNERTM_PROPAGATE |
dwcbVarLenData |
0x00000000 |
0 |
dwReserved1 |
0xcd64cd64 |
dwReserved1: 0xcd64cd64 |
The sending transaction manager then sends a PARTNERTM_PROPAGATE_MTAG_PROPAGATE user message to the receiving transaction manager and specifies the transaction identifier (guidTx), the isolation level (isoLevel), the transaction description (szDesc), and the isolation flags (isoFlags).
Field |
Value |
Value description |
---|---|---|
MsgTag |
0x00000FFF |
MTAG_USER_MESSAGE |
fIsMaster |
0x00000001 |
1 |
dwConnectionId |
0x00000001 |
1 |
dwUserMsgType |
0x00002001 |
PARTNERTM_PROPAGATE_MTAG_PROPAGATE |
dwcbVarLenData |
0x0000003c |
60 |
dwReserved1 |
0xcd64cd64 |
dwReserved1: 0xcd64cd64 |
guidTx |
0x4046037E 0x46C99722 0x06999883 0x35CB4123 |
4046037e-9722-46c9-9883-99062341cb35 |
isoLevel |
0x00100000 |
ISOLATIONLEVEL_SERIALIZABLE |
szDesc |
0x706D6173 0x7420656C 0x736E6172 0x69746361 0x00006E6F 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 |
"sample transaction" |
When the receiving transaction manager receives the message, it adds the transaction to its list of known transactions. If the propagation is successful, the receiving transaction manager sends to the sending transaction manager a PARTNERTM_PROPAGATE_MTAG_PROPAGATED user message.
Field |
Value |
Value description |
---|---|---|
MsgTag |
0x00000FFF |
MTAG_USER_MESSAGE |
fIsMaster |
0x00000000 |
0 |
dwConnectionId |
0x00000001 |
1 |
dwUserMsgType |
0x00002002 |
PARTNERTM_PROPAGATE_MTAG_PROPAGATED |
dwcbVarLenData |
0x00000000 |
0 |
dwReserved1 |
0xcd64cd64 |
dwReserved1: 0xcd64cd64 |
When the sending transaction manager receives the PARTNERTM_PROPAGATE_MTAG_PROPAGATED message, it adds the receiving transaction manager as a subordinate branch to its list of enlistments for the transaction. If the subordinate transaction manager is successfully added, the sending transaction manager replies to the sender that the export completed successfully.
The sending transaction manager keeps the connection alive for future two-phase commit processing when the transaction is committed or aborted.