Winapi.Mtx.CreateTransactionContextEx

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function CreateTransactionContextEx: ITransactionContextEx;

C++

extern DELPHI_PACKAGE _di_ITransactionContextEx __fastcall CreateTransactionContextEx(void);

Properties

Type Visibility Source Unit Parent
function public
Winapi.Mtx.pas
Winapi.Mtx.hpp
Winapi.Mtx Winapi.Mtx

Description

Instantiates a TransactionContextEx object, which marks the beginning of a transaction.

MTS base clients use CreateTransactionEx to combine the work of one or more MTS objects into an atomic transaction and to commit or abort the transaction. Clients initiate a transaction by instantiating a CreateTransactionEx object. Clients end a transaction by calling Complete or Abort on the object.



Method Description

Abort

Aborts the work of all MTS objects participating in the current transaction. The transaction is completed on return from this method.

Commit

Attempts to commit the work of all MTS objects participating in the current transaction. If any of the MTS objects participating in the transaction call SetAbort or DisableCommit, or if a system error occurs, the transaction is aborted. Otherwise, the transaction is committed. In either case, the transaction is completed on return from this method.

CreateInstance

Instantiates another MTS object. If the component that provides the object is configured to support or require a transaction, then the new object runs under the transaction of the TransactionContextEx object.



See Also