RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
Mtx.CreateTransactionContextEx Function

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

Pascal
function CreateTransactionContextEx: ITransactionContextEx;
C++
ITransactionContextEx CreateTransactionContextEx();

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.  

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!