3.3.1 Abstract Data Model

This section describes a conceptual model of possible data organization that an implementation maintains to participate in this protocol. The described organization is provided to facilitate the explanation of how the protocol behaves. This document does not mandate the implementations adhere to this model as long as their external behavior is consistent with the behavior that is described in this document.

Note that the abstract data model can be implemented in a variety of ways. This protocol does not prescribe or advocate any specific implementation technique.

The XA Superior Transaction Manager MUST maintain all the data elements that are specified in section 3.1.1.

The Superior Transaction Manager MUST also maintain the following data elements:

  • XA Superior Proxy object: This object represents a Superior XA Transaction Manager associated with a Resource Manager ID. An XA Superior Proxy object MUST contain the following elements:

    • Transaction Manager Connection: A connection object as defined by [MS-CMP] to hold the connection with the XA Subordinate Transaction Manager Facet, which has been extended to include a State data element as specified in section 3.1.1.

    • Open Count: Specifies how many times xa_open has been called in association with the current Resource Manager ID.

    • Resource Manager Recovery GUID: An identifier provided to identify the XA Superior Transaction Manager to the XA Subordinate Transaction Manager Facet. This identifier persists through failure and recovery.

    • Resource Manager ID: A 32-bit unsigned integer that identifies the XA Superior Proxy object in the XA Superior Proxy Table.

    • Transaction Timeout: A 32-bit unsigned integer that represents the number of milliseconds to wait before a transaction will time out in the Core Transaction Manager (see [MS-DTCO] section 3.2.1).

    • Branch Isolation: A flag specifying whether the associated XA Branches corresponding to the XA Transaction objects in the XA Transaction Table are loosely or tightly coupled:

      • Tight: Transaction objects are associated to XIDs based on the XA Global Transaction Identifier field of the XID.

      • Loose: Transaction objects are associated to XIDs based on the entire XID.

    • TM: A transaction manager description, used for the Transaction object.

    • Recovery Complete {true,false}: A Boolean flag indicating if the current recovery process is complete. This flag can have one of the two values: TRUE or FALSE. If there was no recovery started or if the recovery process has ended its value will be TRUE otherwise FALSE.

    • XA Transaction Table: A table of XA Transaction objects associated with the resource manager ID keyed by XID.

    • Recovery Request Number: The number of XIDs requested from XA Subordinate Transaction Manager Facet in the most recent XAUSER_CONTROL_MTAG_RECOVER message.

    • Recovery Max Return: The maximum number of XIDs to return to xa_recover event triggered on the XA Superior Transaction Manager.

    • Recovery Return Number: The number of XIDs in need of Recovery that have been received from the XA Subordinate Transaction Manager Facet.

    • Recovery Array: A reference to an array of XIDs in need of Recovery that have been received from the XA Subordinate Transaction Manager Facet.

  • XA Superior Proxy Table: A table of XA Superior Proxy objects that is keyed by Resource Manager ID.

  • XA Transaction object: This object represents an XA Transactions Branch. An XA Transactions object MUST contain the following elements:

    • XID: The XID associated with the XA Transaction.

    • Transaction Identifier: The identifier field of the OleTx transaction object associated with the XA Transaction.

    • Thread Identifier: The execution Thread Identifier used to ensure thread affinity if required by setting Require Thread Affinity attribute to TRUE.

    • Migrate: A Boolean flag indicating if the XA Transaction has been migrated. This flag can take one of the two values: TRUE or FALSE.

    • Require Thread Affinity: A Boolean flag indicating if additional validation is to be performed to enforce thread affinity for the XA Transaction. This flag can take one of the two values: TRUE or FALSE.

    • Parent XA Superior Proxy Object: A reference to the corresponding XA Superior Proxy object.

    • State: The current state of the XA Transaction. This attribute can take of the following values:

      • {Idle, Starting, Opening, Preparing, Prepared, Committing, Aborting, Active, Suspended, Complete}.

    • Connection: A reference to XA Transaction CMP Connection object.

  • XA Superior Proxy CMP Connection object: CMP connection object extended to include the following:

    • A reference to an XA Superior Proxy object.

    • State: A state enumeration that represents the current state of the connection.

  • XA Transaction CMP Connection object: CMP Connection object extended to include the following:

    • Reference to an XA Transaction Object.

    • Action:

      • {Prepare, Prepare Single Phase, Commit, Rollback, None, Migrate, Resume}.

    • State: A state enumeration that represents the current state of the connection.

  • XA Switch object: An instance of the xa_switch_t structure as defined in [XOPEN-DTP] chapter 4.3.