org.nakedobjects.runtime.transaction
Interface NakedObjectTransaction

All Superinterfaces:
Component, TransactionScopedComponent
All Known Implementing Classes:
NakedObjectTransactionAbstract, NakedObjectTransactionDefault, ObjectStoreTransaction

public interface NakedObjectTransaction
extends TransactionScopedComponent

Used by the NakedObjectTransactionManager to captures a set of changes to be applied.

The protocol by which the NakedObjectTransactionManager interacts and uses the NakedObjectTransaction is not API, because different approaches are used. For the server-side ObjectStoreTransactionManager, each object is wrapped in a command generated by the underlying ObjectStore. for the client-side ClientSideTransactionManager, the transaction simply holds a set of events.

Note that methods such as flush(), commit() and abort() are not part of the API. The place to control transactions is through the transaction manager, because some implementations may support nesting and such like. It is also the job of the NakedObjectTransactionManager to ensure that the underlying persistence mechanism (for example, the NakedObjectStore) is also committed.


Nested Class Summary
static class NakedObjectTransaction.State
           
 
Method Summary
 java.lang.RuntimeException getAbortCause()
          The underlying reason (if known) why the transaction was aborted.
 MessageBroker getMessageBroker()
          The MessageBroker for this transaction.
 NakedObjectTransaction.State getState()
          The state of this transaction.
 NakedObjectTransactionManager getTransactionManager()
          The owning transaction manager.
 UpdateNotifier getUpdateNotifier()
          The UpdateNotifier for this transaction.
 

Method Detail

getState

NakedObjectTransaction.State getState()
The state of this transaction.


getAbortCause

java.lang.RuntimeException getAbortCause()
The underlying reason (if known) why the transaction was aborted.

Will be set if an exception is thrown while flushing, committing or aborting.


getTransactionManager

NakedObjectTransactionManager getTransactionManager()
The owning transaction manager.


getUpdateNotifier

UpdateNotifier getUpdateNotifier()
The UpdateNotifier for this transaction.


getMessageBroker

MessageBroker getMessageBroker()
The MessageBroker for this transaction.



Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.