Page

17.0.0- Introducing Transactions and COM+

Created by Brendan Doss.
Last Updated by Jim Minatel.  

PublicCategorized as 17. Introducing Transactions and COM+.

Not yet tagged

Chapter1717.1.0- Understanding Transactions >>


Introducing Transactions and COM+

In the previous chapter , we looked at components and how we can use them to encapsulate related pieces of our programming logic – and we thought about some of the reasons why that is a good thing to do. At the end of the chapter, we saw a very simple example – it used a simple component and an ASP page to manage a transfer of cash from one back account to another.

 

That example served us well in that it demonstrated how to build and use a simple component. However, in a large banking organization, that example wouldn't be a very robust one to use. There was nothing in particular wrong with the component, or with the ASP page – it's just that, for the purposes of simplicity, we didn't take account of a number of important things. For example:

 

  • There might be hundreds (or even thousands) of cashiers accessing the data store at the same time. What if two cashiers were simultaneously trying to withdraw cash from the same account, but the account owner only has enough cash to support one of the checks?
  • No system is totally immune to breakdowns and power failures. What happens if there's a breakdown in the system part-way through the cash transfer?

 

These are just a couple of scenarios in which our current banking system will fail. However, there is an established technique that we can exploit in order to deal with these potential disaster scenarios. That is, we implement the transfer as part of a transaction.

 

So in this chapter we'll begin by taking a step back from the components, and understanding what a transaction is – and we'll re-implement our banking system using pure ASP (without a component) and transactions. Then, we'll pull together the power of components and transactions, to implement the system a third time – and this will be the most powerful and robust of all.

As we step through this, we will be taking a look at:

 

  • What a transaction is, and why we need transactions
  • How we can make ASP work together with COM+ to implement transactional web applications
  • Building a transactional web application that uses ASP and ADO
  • How we can use COM+ and the Component Services tool to install components into COM+, and have COM+ manage the components and their related transactions for us
  • Creating a COM+ Application with a transaction-aware component, that can be called from ASP

 

In a nutshell, COM+ provides a framework for managing transactions, components, and other aspects of application design – and it is built-in to the operating system and ready-to-use. COM+ really is a fantastic advance in creating robust and scalable applications.

 

We'll explore all these ideas during the course of the chapter. Let's get started with an introduction to transactions and transactional applications.


Chapter1717.1.0- Understanding Transactions >>

Copyright © 2003 by Wiley Publishing, Inc.

Powered by Near-TimeTerms of Services | Privacy Policy | Security Policy |