|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.marringtons.object.Transaction
The Adept database includes a session based transaction wrapper for combining database updates so that they can all be committed or discarded together. Call start() and all database commits will be held and deferred until an end() or abort(). Transactions can be nested. The infrastructure will call endAll() at the end of a response to the UI to make sure there are no outstanding transactions while waiting for user input. The infrastructure also catches any unchecked exceptions and aborts any outstanding transactions. In practice this means that code can call Transaction.start() to start a transaction set, then forget all about it knowing the the transaction will be committed or aborted at the correct time.
| Constructor Summary | |
Transaction()
|
|
| Method Summary | |
static void |
abort()
Abort a transaction - discarding outstanding changes. |
static void |
abortAll()
End all outstanding transactions in the nest. |
static void |
end()
Finalise a transaction - committing outstanding changes. |
static void |
endAll()
End all outstanding transactions in the nest. |
static boolean |
isActive()
Called by the infrastructure to make sure there are no active transactions at a point where all logic should be complete - as in the end of a web transaction. |
static void |
start()
Start a new Transaction. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Transaction()
| Method Detail |
public static void start()
public static void end()
public static void endAll()
public static void abort()
public static void abortAll()
public static boolean isActive()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||