| << 17.2.1- COM+ and Component Services | Chapter17 |
Summary
COM+ provides the capability for managing transactions, components, and other aspects of application design. These capabilities are built into COM+ and exist as part of the Windows 2000 operating system. This means that we developers don't have to think too hard about these issues when we're designing and writing our ASP applications (or any other kind of application!).
What did we learn about COM+ and transactions in this chapter? We saw that:
- A transaction is a set of (usually related) tasks, which are executed either all-together or not-at-all
- The completion or failure of the transaction is decided by a 'voting system' – each part of the transaction can elect that the transaction should 'complete' or 'abort'. The transaction will complete only if there are no votes to abort, and if there are no system crashes
- The ObjectContext object provides us with the functionality for voting on the transaction's outcome – via its SetComplete and SetAbort methods
- There are two event handlers – onTransactionComplete and onTransactionAbort – which handle the TransactionComplete and TransactionAbort events that are fired when a transaction completes or aborts
- We can employ transactions directly in our ASP pages by using the @TRANSACTION directive in our pages. This tells COM+ to provide an ObjectContext object for the page, and to judge on the outcome of the transaction
- We can write components that encapsulate tasks that require a transaction. We can install these components into a COM+ Application, indicating the transactional requirements of the component. Then COM+ will manage the instances of the component, its transactional activity, and other aspects such as security
In fact, by allowing COM+ to manage our component instances and monitor our transactions, we achieve a more scalable system. How? Because COM+ uses a pool to hold component instances that aren't being used within a transaction, and to can manage these instances by handing them out when ever an application requires one. This means that fewer component instances are created overall, which means a lower burden on our server resources. This in turn means that our application will be more scalable, because our resources will be able to serve a greater number of users.
In the next chapter , we'll move away from COM+ and onto another exciting new technology – XML. We'll take a look at what XML is, and we how can use it within our ASP applications to deliver data to our users.
| << 17.2.1- COM+ and Component Services | Chapter17 |

RSS

