|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITransaction
Adds transaction control methods to ISimpleTransaction
- commit()
and rollback()
. Business method calls on objects, obtained from
getInterface(Class)
are not automatically committed or rolled back.
ITransaction holds resources (DB connection) until explicit call to commit()
or rollback()
, so you must call one of them once you start transaction
(else resource leak may occur).
If single-connection pool is used, then you cannot call something from other transactions
(even from simple transactions) during active transaction - they have to wait until single
DB connection is released by the current transaction. In most cases voilation of this rule
leads to deadlock, so if you are using ITransaction then all data access interfaces should
by obtained from it, not from other transactions.
Method Summary | ||
---|---|---|
void |
commit()
Commits transaction. |
|
|
getInterface(java.lang.Class<T> iface)
Returns data access interface generated by preprocessor. |
|
void |
rollback()
Rolls back transaction. |
Method Detail |
---|
<T extends IDBCommon> T getInterface(java.lang.Class<T> iface) throws java.rmi.RemoteException
ISimpleTransaction
getInterface
in interface ISimpleTransaction
iface
- interface class
java.rmi.RemoteException
void rollback() throws java.rmi.RemoteException, java.sql.SQLException
java.rmi.RemoteException
java.sql.SQLException
void commit() throws java.rmi.RemoteException, java.sql.SQLException
java.rmi.RemoteException
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |