Export (0) Print
Expand All

CommittableTransaction::EndCommit Method

Ends an attempt to commit the transaction asynchronously.

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

public:
void EndCommit(
	IAsyncResult^ asyncResult
)

Parameters

asyncResult
Type: System::IAsyncResult

The IAsyncResult object associated with the asynchronous commitment.

ExceptionCondition
TransactionAbortedException

BeginCommit is called and the transaction rolls back for the first time.

You should call this method in the callback delegate specified as a parameter to the BeginCommit method, when you have finished any cleanup work associated with the asynchronous commitment. You can also call this method early without waiting for the delegate. If, by the time you call this method, the transaction has not completed, this method waits for its completion.

Caution noteCaution

The CompletedSynchronously property returned by asyncResult is always false, even if the operation completed synchronously.

Commit and EndCommit block until the first phase of transaction processing is complete. The first phase ends after all resource managers and enlistments in the transaction have voted on the transaction outcome and the TransactionManager has durably decided to commit or abort the transaction. The second phase of processing is always asynchronous. Therefore, there is no guarantee that data just committed from within a given transaction will be immediately available afterwards when not using another transaction to view this data.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft