|
JDBaccess API 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Transaction
A transaction is similar to a database session. You start a transaction (get a separate database connection), perform a sequence of database access operations (statements) on it and if no error has occurred you commit it else you rollback it. Finally you end your transaction.
Examples: You start a transcation by: Transaction t = DAReader.getTransaction(); t.begin(); You commit a transcation by: t.commit(); You rollback a transcation back by: t.rollback(); You end a transcation by: t.end();If you begin a transaction you should not forget the commit and end of that transaction so that the underlying database connection can be reused. If you begin a transaction a database connection is fetched from internal connection pool exclusive for that transaction. If you finish your transaction the underlying database connection is returned back to the connection pool for reuse.
| Method Summary | |
|---|---|
void |
begin()
Begins a transaction. |
void |
commit()
Commit of this transaction |
void |
end()
Ends a transaction. |
void |
rollback()
Rollback of this transaction |
| Method Detail |
|---|
void begin()
throws ApplicationException
ApplicationException
void end()
throws ApplicationException
ApplicationException
void commit()
throws ApplicationException
ApplicationException
void rollback()
throws ApplicationException
ApplicationException
|
JDBaccess API 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||