Prevayler™
The Free Software
Prevalence Layer

org.prevayler
Interface Transaction

All Superinterfaces:
java.io.Serializable

public interface Transaction
extends java.io.Serializable

An atomic Transaction to be executed on a Prevalent System. Any operation which changes the observable state of a prevalent system must be encapsulated as a Transaction.

IMPORTANT: Transactions CANNOT reference business objects directly. Instead, they must search the business objects they need given the Prevalent System. See org.prevayler.demos for usage examples.

Business objects referenced in a transaction will be mere copies of the original business objects when that transaction is recovered from the serialized transactionLog file. This will make the transactions work when they are executed for the first time but have no effect during shutdown recovery. This is known as the prevalence baptism problem because everyone comes across it, despite of this warning.


Method Summary
 void executeOn(java.lang.Object prevalentSystem, java.util.Date executionTime)
          This method is called by Prevayler.execute(Transaction) to execute this Transaction on the given Prevalent System.
 

Method Detail

executeOn

public void executeOn(java.lang.Object prevalentSystem,
                      java.util.Date executionTime)
This method is called by Prevayler.execute(Transaction) to execute this Transaction on the given Prevalent System. See org.prevayler.demos for usage examples.

Parameters:
prevalentSystem - The system on which this Transaction will execute.
executionTime - The time at which this Transaction is being executed. Every Transaction executes completely within a single moment in time. Logically, a Prevalent System's time does not pass during the execution of a Transaction.


'Prevayler' is a trademark of Klaus Wuestefeld.
Copyleft 2001-2004 Klaus Wuestefeld.