3.2.2.1 Transaction Timeout Timer

The Transaction Timeout timer MUST be set when a new transaction is created. It MUST be canceled when a transaction enters one of the following states:

The default value is specified by the Timeout field on the transaction object for which the instance of the timer is set. The minimum value of the timer MUST be zero, which means that the timer never generates a timer event.

When the timer is initialized, the initialization MUST provide a transaction object to associate with the timer. When the timer expires, the same transaction object MUST be a transaction object provided alongside the timer notification. The Core Transaction Manager Facet MUST provide a distinct Transaction Timeout Timer instance for each active transaction. If an implementation sets the value of the timeout timer to zero, the Transaction Timeout Timer event (section 3.2.6.1) is never signaled, and therefore the transaction never times out. Examples of negative consequences of transactions that do not time out include resource availability and deadlocks between resources. In the availability example, if an application starts a transaction and accesses a resource, to provide isolation that resource typically blocks access to the specific item until the transaction completes. But if the application has an issue and does not complete the transaction within a reasonable amount of time, other applications are prevented from accessing the resource item. In the deadlock example, two resources are accessed by two different applications, but in reverse order. This results in the two applications blocking each other because each has its own transaction that holds a lock that the other needs to proceed. When transaction timeout values are implemented, these error scenarios resolve themselves by forcing the transactions to rollback after the specified timer period.