Transaction Methods

Since in ActiveSpaces transactions can span operations on more than one space, users need to specify the start and the end of a transaction using the metaspace’s beginTransaction, commit, or rollback methods.

A transaction is associated with the thread that created it: at the end of the transaction all of the space operations invoked by that thread will be either committed (if none of those space operations failed) or rolled back (if one of those operations failed), according to the method invoked. In other words, the prepare phase of the transaction is the invocation of operations on a space by a thread that has invoked beginTransaction first.

Obviously, only space operations that modify the data stored in a space are affected by the outcome of the transaction, but a get operation within a transaction will always return the uncommitted version of the tuples that may have been modified in that transaction.

Related concepts