3.3.4.2.2 Querying Transaction Manager's Support for Modifying a Transaction Timeout Using CONNTYPE_TXUSER_SETTXTIMEOUT2
The application MUST perform the following steps:
Find an instance of a CONNTYPE_TXUSER_BEGIN2 (section 2.2.8.1.2) or CONNTYPE_TXUSER_PROMOTE (section 2.2.8.1.3) connection in the connection list of the transaction. This connection is referred to as the beginner connection.
If a connection is not found:
The application MUST return a failure result to the higher-layer business logic.
Otherwise, if the connection state is not Processing Transaction (section 3.3.1.2.3) or Processing Transaction (section 3.3.1.3.3):
The application MUST return a failure result to the higher-layer business logic.
Otherwise:
Initiate a new CONNTYPE_TXUSER_SETTXTIMEOUT2 (section 2.2.8.3.4) connection using the Transaction Manager Name field of the application. This connection is referred to as the new connection.
Add the new connection to the transaction connection list.
Assign the transaction object to the Connection-Specific Data field of the new connection.
Send a TXUSER_SETTXTIMEOUT_MTAG_SETTXTIMEOUT (section 2.2.8.1.2.7) using the new connection:
The guidTx field MUST be set to a NULL GUID.
The dwTxTimeout value MUST be set to zero.
Set the new connection state to Awaiting Set Timeout Response (section 3.3.1.13.2).
Set the beginner connection state to Awaiting Set Timeout Response (section 3.3.1.2.4) if the beginner connection is CONNTYPE_TXUSER_BEGIN2, or to Awaiting Set Timeout Response (section 3.3.1.3.4) if the beginner connection is CONNTYPE_TXUSER_PROMOTE.