3.2.7.13 Create Transaction
The Create Transaction event MUST be signaled with the following arguments:
An Enlistment object
If the Create Transaction event is signaled, the Core Transaction Manager MUST perform the following actions:
The Core Transaction Manager MUST:
Look for an existing entry in the transaction table, using the Transaction Object.Identifier field of the transaction object referenced by the provided Enlistment object as the key.<27>
If an entry exists:
Signal the Create Transaction Failure (section 3.4.7.7) event on the Transaction Manager facet referenced by the provided Enlistment object with the following arguments:
The provided transaction object
The Duplicate reason code
Cease processing the event
If the Core Transaction Manager does not have sufficient memory available to process the Create Transaction event:
Signal the Create Transaction Failure (section 3.4.7.7) event on the Transaction Manager facet referenced by the provided Enlistment object with the following arguments:
The provided transaction object
The No Mem reason code
Cease processing the event.
If the Core Transaction Manager Facet.Durable Log is too full (section 3.2.3.2) to accept a new transaction:
Signal the Create Transaction Failure (section 3.4.7.7) event on the Transaction Manager facet referenced by the provided Enlistment object with the following arguments:
The provided transaction object
The Log Full reason code
Cease processing the event.
Add the transaction object referenced by the provided Enlistment object to the transaction table, by using the Transaction Object.Identifier field of the transaction object as the key.
Set the transaction's Superior Enlistment to the provided Enlistment object.
Set the transaction's Root flag to true.
Set the transaction's State to Active.
Initialize the transaction Timeout timer with the following arguments:
The transaction object
The transaction object's Timeout value
Signal the Create Transaction Success (section 3.4.7.8) event on the Transaction Manager facet referenced by the provided enlistment with the transaction object referenced by the provided Enlistment object.