The resource manager calls the ReenlistmentComplete method after resolving all the in-doubt transactions it knows about.
- One or more arguments are invalid.
- Unable to allocate memory.
- Something unexpected occurred.
- Lost connection with the transaction manager.
- The ReenlistmentComplete method was called at least once after this interface was obtained. Therefore, the recovery is already complete.
This method lets the coordinator forget any transactions that it was remembering; it had an obligation to remember those transactions until it was certain that the resource manager knew the outcome of those transactions. A resource manager forgets a transaction before responding to the second phase. This allows for an interval in which a resource manager would have forgotten a transaction but not the transaction manager. This window exists because the committed message from the resource manager to the coordinator can get lost on its way due to some fault. A coordinator would not know if the resource manager has received the commit notification or not, unless it receives the committed message from the resource manager. Until it receives the committed message, it cannot forget the transaction. The resource manager, when it reestablishes a relationship with the coordinator, queries the status for all the in-doubt transactions but does not ask for the transactions that it had already forgotten. After resolving all the in-doubt transactions, it simply calls IResourceManager::ReenlistmentComplete, which then lets the transaction manager forget the transactions.
This protocol lets the recovery process be repeated multiple times without affecting the outcome of transactions. Any number of failures can occur during recovery, but the results are always the same. This protocol also lets the resource managers enlist in new transactions while the in-doubt transactions are being resolved. The coordinator is able to discern between the new transactions and the old transactions. New transactions are the ones that the resource manager enlists in from the time when the new resource manager-to-coordinator relationship is established, and all the old transactions are those it had enlisted in prior to the establishment of the new relationship.
For an explanation of the requirement values, see Requirements.
Platforms: Windows 2000, Windows XP, Windows Server 2003
Header: Declared in txdtc.h