TransactionContext class

Creates a generic transactional object that begins a transaction. By calling the methods of this class, you can compose the work of multiple COM objects in a single transaction and explicitly commit or abort the transaction.

When to implement

This class is implemented by COM+.

Requirement Value
CLSID CLSID_TransactionContext
ProgID L"TxCTx.TransactionContext"
Interfaces ITransactionContext

When to use

A non-transactional client uses this class to begin a transaction. Using the methods of this class, the client can call additional COM objects that, if configured to participate in a transaction, run within the transaction boundary of the transaction context object. Based on its business logic, the client can explicitly commit or abort the transaction.

The TransactionContext class limits reuse of the business logic driving the transaction. For this reason, it is recommended that objects instantiated from the TransactionContext class be used sparingly.

Remarks

To create this object, call IObjectContext::CreateInstance.

To use this class from Microsoft Visual Basic, add a reference to the COM+ Services Type Library. A TransactionContext object can be declared using "COMSVCSLib.TransactionContext" as the class name.

Requirements

Requirement Value
Minimum supported client
Windows 2000 Professional [desktop apps only]
Minimum supported server
Windows 2000 Server [desktop apps only]
Header
ComSvcs.h

See also

Configuring Transactions

ITransactionContext

TransactionContextEx