2.2.1.3 XA_XID

The XA_XID structure is used to represent an XA Transaction Branch. This structure follows the format specified by the technical standard, "Distributed Transaction Processing: The XA Specification", as specified in [XOPEN-DTP]. The particular format of the XA_XID structure is used when MSDTC creates the XID, which occurs only in the scenario described in section 1.3.1.2. When MSDTC is the subordinate transaction manager as in the scenario described in section 1.3.1.1, the XID is provided by the superior XA Transaction Manager, and the format of the XID can vary.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

formatID

gtridLength

bqualLength

Data (128 bytes)

...

...

formatID (4 bytes):  A 32-bit integer value that MUST contain an XA Format Identifier that identifies the format used to interpret the remainder of the XA_XID. It MUST be set to the value 0x00445443.

gtridLength (4 bytes):  An integer value that MUST contain the length in bytes of the XA Global Transaction Identifier portion of an XA Transaction Branch Identifier, as stored in the data array. This value MUST be no greater than 64 bytes.

Value

Meaning

16

The size in bytes of a GUID structure.

This value is used if the value of formatID is 0x00445443.

bqualLength (4 bytes):  An integer value that MUST contain the length, in bytes, of the XA Branch Qualifier portion of an XA Transaction Branch Identifier, as stored in the Data array. This value MUST be no greater than 64 bytes.

Value

Meaning

32

The size, in bytes, of a XA_BQUAL_1 structure. If this value is used, the value of formatID MUST be 0x00445443, and the BranchGUID field MUST NOT be present in the XA_BQUAL_1 structure.

48

The size, in bytes, of a XA_BQUAL_1 structure. If this value is used, the value of formatID MUST be 0x00445443, and the BranchGUID field MUST be present in the XA_BQUAL_1 structure.

Data (128 bytes):  An array of bytes that MUST contain both the XA Global Transaction Identifier and the XA Branch Qualifier portions of an XA Transaction Branch Identifier. The array MUST be 128 bytes in length. The XA Global Transaction Identifier data MUST begin at the first byte in the array. The XA Branch Qualifier data MUST begin at an offset of gtridLength bytes into the array. Bytes unused by the XA Global Transaction Identifier or the XA Branch Qualifier MUST be ignored.

If the value of formatID is 0x00445443:

  • The XA Global Transaction Identifier data MUST contain a GUID that specifies the transaction identifier.

  • The XA Branch Qualifier data MUST contain an XA_BQUAL_1 structure.