TransactionContext class (COM+)

Switch View :
ScriptFree
TransactionContext class

Applies to: desktop apps only

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+.

CLSIDCLSID_TransactionContext
ProgIDL"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

Minimum supported client

Windows 2000 Professional

Minimum supported server

Windows 2000 Server

Header

ComSvcs.h

See also

Configuring Transactions
ITransactionContext
TransactionContextEx

 

 

Send comments about this topic to Microsoft

Build date: 2/3/2012