24.

previous chapter table of contents next chapter
  

Overview

TRANSACTIONS ARE A NECESSARY PART of many distributed operations. Frequently two or more objects may need to synchronize changes of state so that they all occur, or none occur. This happens in situations such as control of ownership, where one party has to give up ownership at the same time as another asserts ownership. What has to be avoided is only one party performing the action, which could result in the property having either no owners or two owners .

The theory of transactions often includes mention of the "ACID" properties:

  • Atomicity : All the operations of a transaction must take place, or none of them do.

  • Consistency : The completion of a transaction must leave the participants in a "consistent" state, whatever that means. For example, the number of owners of a resource must remain at one.

  • Isolation : The activities of one transaction must not affect any other transactions.

  • Durability : The results of a transaction must be persistent.

The practice of transactions is that they use the two-phase commit protocol. This requires that participants in a transaction are asked to "vote" on a transaction. If all participants agree to go ahead, then the transaction "commits," which is binding on all the participants. If any "abort" during this voting stage, this forces abortion of the transaction for all participants.

Jini has adopted the syntax of the two-phase commit method. It is up to the clients and services within a transaction to observe the ACID properties if they choose to do so. Jini essentially supplies the mechanism of two-phase commit and leaves the policy to the participants in a transaction.

  


A Programmer[ap]s Guide to Jini Technology
A Programmer[ap]s Guide to Jini Technology
ISBN: 1893115801
EAN: N/A
Year: 2000
Pages: 189

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net