Page #97 (Compensating Resource Manager)

< BACK  NEXT >
[oR]

Summary

In this chapter, we first looked at the issues involved while updating multiple transactional resources.

To ensure system integrity, a transaction has to support four properties: atomicity, consistency, isolation, and durability. Collectively, these properties are referred to as the ACID properties.

A resource manager (RM) is a software component that manages the durable state of a specific type of transactional resource, such as a relational database.

A distributed transaction coordinator (DTC) coordinates a transaction across multiple machines over the network. Each RM involved in a transaction is enlisted with the DTC. When the transaction completes, the DTC informs the participating RMs to either commit the changes made to their respective resources or to abort the changes. A transaction is committed using a two-phase protocol.

COM+ simplifies developing components by automatically managing a transaction. A COM+ component can indicate its interest in transactions by a configurable attribute. When such an object is activated, COM+ sets its context to deal with transactions. A participating object has to individually indicate to COM+ if its operations succeeded or failed. If any participating object indicates a failure condition, COM+ aborts the transaction. If all the participating objects vote positively, COM+ commits the transaction.

If a component is marked as requiring a transaction, COM+ automatically enforces that the component is marked as JIT Activation=TRUE and Synchronization=Required. By forcing JIT activation, a component can achieve transactional correctness without sacrificing efficiency.

Finally, we looked at the infrastructure provided by COM+ to develop a compensating resource manager.


< BACK  NEXT >


COM+ Programming. A Practical Guide Using Visual C++ and ATL
COM+ Programming. A Practical Guide Using Visual C++ and ATL
ISBN: 130886742
EAN: N/A
Year: 2000
Pages: 129

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net