4.2.1.1 Registering a Two-Pipe XA Resource Manager

This scenario is initiated when the higher-level logic signals the Register Two-Pipe XA Resource Manager event on an XA Resource Manager Bridge, providing a Data Store Name, a DLL Name, and a Resource Manager Cookie.

The XA Resource Manager Bridge initiates a connection with the XA Resource Manager Bridge Facet using CONNTYPE_XATM_OPEN as follows.

Field

Value

Value description

MsgTag

0x00000005

MTAG_CONNECTION_REQ

fIsMaster

0x00000001

1

dwConnectionId

0x00000002

2

dwUserMsgType

0x00001001

CONNTYPE_XATM_OPEN

dwcbVarLenData

0x00000000

0

dwReserved1

0xCD64CD64

dwReserved1: 0xcd64cd64

The XA Resource Manager Bridge then sends an XATMUSER_MTAG_RMOPEN user message specifying the Data Store Name and DLL Name as follows.

Field

Value

Value description

MsgTag

0x00000FFF

MTAG_USER_MESSAGE

fIsMaster

0x00000001

1

dwConnectionId

0x00000002

2

dwUserMsgType

0x20000001

XATMUSER_MTAG_RMOPEN

dwcbVarLenData

0x00000024

36

dwReserved1

0xCD64CD64

dwReserved1: 0xcd64cd64

lenDSN

0x00000010

16

lenXaDll

0x00000008

8

Recover

0x00000000

The transaction manager does not perform recovery.

DSN

0x656D614E

"Data Source Name"

0x20656372

0x756F5320

0x61746144

XaDllFileName

0x6C6C642E

"AnXa.dll"

0x61586E41

When the XA Resource Manager Bridge Facet receives the XATMUSER_MTAG_RMOPEN message from the XA Resource Manager Bridge, the XA Resource Manager Bridge Facet attempts to find an XA Resource Manager object in the XA Resource Manager Table that has its Data Source Name set to the value of the DSN field of the message. In this example, assume such an object was found and its State is Active. The XA Resource Manager Bridge Facet then sends an XATMUSER_MTAG_RMOPENOK message to the XA Resource Manager Bridge specifying the XA Resource Manager Identifier field (localRmId:5) and the Resource Manager Global Identifier (guidRm: 31d8fe66-7752-4bd5-a2b2-b6c4937e601e) field of the XA Resource Manager object.

Field

Value

Value description

MsgTag

0x00000FFF

MTAG_USER_MESSAGE

fIsMaster

0x00000000

0

dwConnectionId

0x00000002

2

dwUserMsgType

0x20000002

XATMUSER_MTAG_RMOPENOK

dwcbVarLenData

0x00000014

20

dwReserved1

0xCD64CD64

dwReserved1: 0xcd64cd64

localRmId

0x00000005

5

guidRm

0x31D8FE66

0x31d8fe66-7752-4bd5-a2b2-b6c4937e601e

0x4BD57752

0xC4B6A2B2

0x1E607E93

When the XA Resource Manager Bridge receives the XATMUSER_MTAG_RMOPEN message, it sets the Resource Manager Global Identifier field of the XA Resource Manager Proxy object referenced by the receiving Connection to the guidRm field of the message, and returns success to the Register Two-Pipe XA Resource Manager event.