4.1.2.1 Committing the Transaction

The application commits the transaction by sending a TXUSER_BEGIN2_MTAG_COMMIT user message specifying a value of zero in the unused grfRM field.

Field

Value

Value description

MsgTag

0x000000FF

MTAG_USER_MESSAGE

fIsMaster

0x00000001

1

dwConnectionId

0x00000001

1

dwUserMsgType

0x00006003

TXUSER_BEGIN2_MTAG_COMMIT

dwcbVarLenData

0x00000004

4

dwReserved1

0xcd64cd64

dwReserved1: 0xcd64cd64

grfRM

0x00000000

0

In response, the transaction manager attempts to commit the transaction by using a two-phase commit. If the transaction manager successfully completes Phase One of the transaction, the transaction manager sends a TXUSER_BEGIN2_MTAG_SINK_ERROR user message to the application with TRUN_TXBEGIN_ERROR_NOTIFY_COMMITTED specified in the Error field.

Field

Value

Value description

MsgTag

0x000000FF

MTAG_USER_MESSAGE

fIsMaster

0x00000000

0

dwConnectionId

0x00000001

1

dwUserMsgType

0x00006005

TXUSER_BEGIN2_MTAG_SINK_ERROR

dwcbVarLenData

0x00000004

4

dwReserved1

0xcd64cd64

dwReserved1: 0xcd64cd64

Error

0x0000001F

TRUN_TXBEGIN_ERROR_NOTIFY_COMMITTED

After the application gets the TXUSER_BEGIN2_MTAG_SINK_ERROR response from its transaction manager, no more user messages can be sent on this connection and the application initiates the disconnect sequence.