Enlisting a Resource in a Transaction

After a resource is allocated, but just before returning the resource to the resource dispenser, the dispenser manager checks with COM+ to see whether the calling object is running within a transaction. If the calling object is running within a transaction, the dispenser manager calls back to the resource dispenser and asks it to enlist the resource in the transaction. Then the resource is returned to the resource dispenser, which then returns it to the calling instance.

The resource dispenser must be able to enlist in an OLE transaction with the Distributed Transaction Coordinator (DTC).

Note

Transaction enlistment is optional when a resource dispenser dispenses non-transactional resources, such as memory or threads.

 

When a transaction is complete, COM+ notifies the dispenser manager about whether it committed or aborted. Then the dispenser manager notifies each resource dispenser's holder that any resources enlisted in this transaction can now be moved to general inventory.

COM+ Resource Dispenser Concepts

Pooled Resource States Available to COM+ Resource Dispenser

Resource Dispenser Resource Allocation Process