O'Reilly logo

COM+ Programming with Visual Basic by Jose Mojica

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Transaction Services

Perhaps the most important feature in COM+ services is transactions. If you think about it, the predecessor to COM+ is Microsoft Transaction Server (MTS); the name implies that the main purpose of the product is to manage transactions.

In this chapter, you will learn about transaction services. A lot of COM+ programming has to do with concurrent data access. In large systems, a number of clients may be using the same COM+ application, and each client may be calling the same methods and accessing and modifying the same data. To guarantee that each client can change data safely, we use transactions.

What Is a Transaction?

A transaction in a database environment is usually defined as the movement of one or two pieces of data from one location to another in a way that guarantees their integrity. The definition of a transaction, however, is not limited to data in a database. It is also possible to involve other resources in the transaction. For example, COM+ transactions may involve MSMQ messages. (A full discussion of MSMQ—a product from Microsoft for sending and receiving messages—is beyond the scope of this book.) In order to ensure the integrity of data involved in them, transactions must meet the ACID rules. The acronym ACID stands for Atomic, Consistent, Isolated, and Durable. These terms have the following meaning:

Atomic

The operation must succeed completely or be rolled back completely. In other words, it is an all or nothing operation. Atomicity ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required