Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

IResourceManager::ReenlistmentComplete

The resource manager calls the ReenlistmentComplete method after resolving all the in-doubt transactions it knows about.

HRESULT ReenlistmentComplete(void);

S_OK
Success.

E_INVALIDARG
One or more arguments are invalid.

E_OUTOFMEMORY
Unable to allocate memory.

E_UNEXPECTED
Something unexpected occurred.

XACT_E_CONNECTION_DOWN
Lost connection with the transaction manager.

XACT_E_RECOVERYALREADYDONE
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.

ms679546.note(en-us,VS.85).gifNote
It is possible for a resource manager to experience an error that causes a transaction to become in-doubt after ReenlistmentComplete is called. If any transactions become in-doubt after ReenlistmentComplete is called, IResourceManagerRejoinable::Rejoin can be called to retrieve the transaction outcomes without needing to restart the resource manager and reconnect to the transaction manager.

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 Server 2016, Windows 10, Windows Server 2012 R2, Windows 8.1, Windows Server 2012, Windows 8, Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista

Header: Declared in txdtc.h

Show:
© 2015 Microsoft