|
Holger's Java API |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DBTransaction
a transaction controlls access to all resources of a Database through DBClassStore instances. A Thread accessing resources must own the monitor on the active transaction. To ensure thread-save consistency on a transaction, a thread must maintain ownership over the transaction throughout the duration of a transaction.
Database| Method Summary | |
|---|---|
void |
abort()
aborts this transaction |
void |
begin()
sets the transaction to active and allows access to the Resources provided that the calling thread holds the lock on this instance. |
void |
commit()
commits all data within the transaction scope to the underlying database |
Database |
getDatabase()
gives access to the associated Database |
boolean |
isActive()
if true, the transaction has begun and not yet committed or aborted. |
| Method Detail |
|---|
Database getDatabase()
void begin()
throws TransactionException
TransactionException - if the transaction is already active
void commit()
throws TransactionException,
DatabaseException
TransactionException - if the transaction is already active
DatabaseException - if the transaction could not be committed to the underlying service
void abort()
throws TransactionException,
DatabaseException
TransactionException - if the transaction is already active
DatabaseException - if the transaction could not be aborted from the underlying serviceboolean isActive()
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||