3.2.7.11 Create Subordinate Enlistment

The Create Subordinate Enlistment event MUST be signaled with the following arguments:

  • An Enlistment object

If the Create Subordinate Enlistment event is signaled, the Core Transaction Manager Facet MUST perform the following actions:

  • If the state of the transaction object referenced by the provided Enlistment object is not Active (section 3.2.1.3.2) and not Phase Zero (section 3.2.1.3.3) and not Phase Zero Complete (section 3.2.1.3.4):

    • Signal the Create Subordinate Enlistment Failure (see sections 3.6.7.10 and 3.7.7.7) event on the Enlistment object's transaction manager facet with the following arguments:

      • The provided Enlistment object

      • The Too Late reason code

  • Otherwise, if the Core Transaction Manager Facet.Durable Log is too full to accept the transaction object referenced by the provided Enlistment object:

    • Signal the Create Subordinate Enlistment Failure (see sections 3.6.7.10 and 3.7.7.7) event on the Enlistment object's transaction manager facet with the following arguments:

      • The provided Enlistment object

      • The Log Full reason code

  • Otherwise, compute the number of Enlistment objects in the Phase One Enlistment list of the transaction object referenced by the provided Enlistment object whose Transaction Manager Facet field is set to Superior Transaction Manager Facet (section 3.2.1.4).

  • If this computed number of Enlistment objects is greater than or equal to an implementation-specific value that indicates the maximum allowed Transaction Manager Enlistments:<26>

    • Signal the Create Subordinate Enlistment Failure (see sections 3.6.7.10 and 3.7.7.7) event on the Enlistment object's transaction manager facet with the following arguments:

      • The provided Enlistment object

      • The Too Many reason code

  • Otherwise:

    • Add the provided Enlistment object to the transaction's Phase One Enlistment list.

    • Signal the Create Subordinate Enlistment Success (see sections 3.6.7.11 and 3.7.7.8) event on the Enlistment object's transaction manager facet with the provided Enlistment object.