Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

The fact that the domain object boxes are drawn inside the red client transaction-rectangles is not just artistic license. Remember that object data is loaded into and stored in transactions. A domain object is an empty shell with properties that don't contain values. Instead, properties know which (sub-) transaction actually holds these values and can retrieve them from there.

What's important here is

  • transactions can spawn off sub-transactions, forming parent-transactions and child-transactions
  • data is passed from child (i.e. sub-) transactions to parent transactions if and when the child transaction is told to Commit() its data
  • the client transaction with no parent - the root transaction - actually writes data to the database if and when the root transaction is told to Commit() its data

In a word: sub-transactions are spawned up the generations, data bubbles down the generations. When a user modifies and saves data in many objects stored in one or more sub-transactions, these modifications aggregate in the parent transaction. If the user cancels that parent transaction, these modifications from sub-transactions will be discarded. Not before the aggregated modifications on the bottom root transaction are committed, will all modifications be persisted.