Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

h2: Overview

The Unit Of Work pattern is a common pattern in enterprise application architectures.

It implements the concept of an "application transaction" that keeps track of:

  • dirty objects
  • new objects
  • removed objects

h2: UnitOfWorkListener

The user implement listeners that allows him to add additional behaviour when specific events are triggered, such as begin, commit, rollback, dispose etc. All listeners must implement that org.codehaus.aware.unitofwork.UnitOfWorkListener interface.

The Unit Of Work will not commit until all listeners have agreed on that. If for example on listener have set the transaction to rollBackOnly then the whole Unit Of Work transaction will rollback.

  • No labels