Summary

In this chapter, you learned how to create transactional components. You first learned what constitutes a transaction. You learned that transactions follow the ACID rules: Atomic, Consistent, Isolated, and Durable. Isolation controls how other transactions affect your transaction. Both SQL Server and Oracle let you control the degree of isolation for transactions.

You also learned the difference between local transactions and distributed transactions. Local transactions involve a single resource manager. Distributed transactions involve the Distributed Transaction Coordinator (DTC). The DTC dispenses a resource known as an ITransaction pointer. OLEDB libraries can join a DTC transaction if they support the ITransactionJoin interface.

COM+ has a service known as declarative transactions. In a declarative transaction, COM+ drives a DTC transaction. Your components are marked through declarative properties as transactional. The first component that is marked as Transaction Required or Transaction Requires New begins a new transaction stream and becomes the root of the transaction. The root of the transaction then creates secondary components. These components must be marked as Transaction Required or Transaction Supported to be part of the same transaction stream. Each component votes on the outcome of the transaction. When the root component is deactivated, the votes are collected. If no component voted to abort the transaction, the COM+ plumbing tells the DTC to begin the two-phase ...

Get COM+ Programming with Visual Basic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.