|
TrueUpdate Manager Specification 0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.trueupdate.manager.spec.tx.Transaction
public abstract class Transaction
A simple interface for local transactions. The use case is to compose file system operations with ACID properties into larger transactions, for example for undeploying, updating and deploying an enterprise application to an application server.
Note that transactions are generally not idempotent, that is once their
execution has succeeded, you may not be able to execute them successfully
again because the preconditions for a successful execution are no longer met.
However, transactions must be retryable, that is if their execution has
failed with any other exception than a TransactionException, then
you will be able to execute them successfully as soon as the preconditions
for a successful execution are met.
Transactions.execute(net.java.trueupdate.manager.spec.tx.Transaction),
CompositeTransaction| Constructor Summary | |
|---|---|
Transaction()
|
|
| Method Summary | |
|---|---|
void |
commit()
Commits the visible side effects of the body of this transaction. |
abstract void |
perform()
Executes the body of this transaction. |
void |
prepare()
Sets up this transaction for execution. |
abstract void |
rollback()
Reverts any visible side effects of the body of this transaction. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Transaction()
| Method Detail |
|---|
public void commit()
throws Exception
perform()
must be durable.
If this method fails, the state of this transaction is undefined and may
be inconsistent.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get neither committed nor
rolled back and their state is undefined and may be inconsistent.
Exception
public abstract void perform()
throws Exception
rollback(), so it may leave some visible side effects.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get properly rolled back.
Exception
public void prepare()
throws Exception
rollback(), so it must not leave any visible side effects.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get properly rolled back.
Exception
public abstract void rollback()
throws Exception
perform().
If this method fails, the state of this transaction is undefined and may
be inconsistent.
If this method fails and this transaction is part of a composite
transaction, then the previous transactions get neither committed nor
rolled back and their state is undefined and may be inconsistent.
Exception
|
TrueUpdate Manager Specification 0.2 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||