Figure 2
• Atomicity. If a transaction is completed successfully (it commits) all of the actions associated with the transaction are performed. Otherwise, if the transaction is not completed successfully, none of the actions are performed and the transaction is rolled back.
• Consistency. All actions that comprise a transaction must be performed accurately so that the system moves from one consistent state to another. In the bank example, this means that the total money in both accounts before the transaction begins is the same as the total money in both accounts after the transaction completes.
• Isolation. This means that intermediate results performed by a transaction are not visible outside the transaction until the entire transaction completes.
• Durability. The results of a transaction are persistent.The VisiTransact Transaction Service can be used to manage the completion of a transaction. It works with objects at the ORB level to coordinate and manage a transaction's commit or rollback. The ORB enables the VisiTransact Transaction Service to propagate the transaction context to each object participating in the transaction. To accomplish this, the VisiTransact Transaction Service interfaces with participants of the transaction at specific points in the transaction management process.In a distributed application, a transaction can involve multiple objects performing multiple requests. The objects that are involved can play a number of different roles. For example, an object that begins a transaction is called the transaction originator. The following table provides descriptions of these roles.
A transactional object is an object whose behavior is affected by the transaction, but has no recoverable state of its own. Although a transactional object does not participate in the completion of a transaction, it can force the transaction to rollback. See “Coordinating transaction completion with Resource objects” for information about recoverable objects, or objects whose recoverable state is affected by the transaction. Although this chapter does not address it, most transactions involve persistent data (such as databases). For these types of transactions, there are two additional participant roles—Resource and Recoverable Server. These roles are discussed in “Coordinating transaction completion with Resource objects”.When an object initiates a transaction, an instance of the VisiTransact Transaction Service begins a transaction for a transaction originator and establishes a transaction context. The transaction context is then associated with the originator's thread of control that was issued by the VisiBroker ORB. The transaction context contains transaction information, including an object transaction identifier (OTRID) that uniquely identifies the transaction.
Figure 3
Figure 5