Export (0) Print
Expand All

IEnlistmentNotification.Commit Method

Notifies an enlisted object that a transaction is being committed.

Namespace: System.Transactions
Assembly: System.Transactions (in system.transactions.dll)

void Commit (
	Enlistment enlistment
)
void Commit (
	Enlistment enlistment
)
function Commit (
	enlistment : Enlistment
)
Not applicable.

Parameters

enlistment

An Enlistment object used to send a response to the transaction manager.

The transaction manager calls this method of an enlisted object during the second phase of a commitment, when it instructs all participants to commit the transaction.

The resource manager should perform any work necessary to finish the transaction and then inform the TM that it has finished by calling the Done method on the enlistment parameter.

If the resource manager has enlisted durably, but does not respond by calling Done method, the transaction manager is unsure that the resource manager has received the Commit call. As such, the transaction manager keeps waiting for a response, and maintains information relevant to this transaction. If Done is never called, this piece of information is kept around indefinitely in memory or in a system-wide resource. This results in resources not being able to be reclaimed. In the case of a distributed transaction, this could eventually fill the MSDTC log which halts the MSDTC process. In the case of a transaction managed by System.Transactions, this results in a gradual and continual increase in the memory consumption of the resource manager's process. Therefore, it is crucial that you call the Done method once your resource manager is done with your prepare work.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft