Transaction¶
-
public interface
Transaction
¶ The Transaction interface allows operations to be performed against the transaction in the target Transaction object. A Transaction object is created by a corresponding DAO factory. Before any transaction starts, the Transaction object should be notified by the invocation of its begin() method. When the transaction is finished, either commit() or rollback should be invoked and the resources it acquired should be released accordingly.
Author: Hugo Y. K. Lam
Methods¶
begin¶
-
public void
begin
()¶ Begins the transaction.
Throws: - DAOException – if unable to begin the transaction.
commit¶
-
public void
commit
()¶ Commits the transaction.
Throws: - DAOException – if unable to commit the transaction.
rollback¶
-
public void
rollback
()¶ Rolls back the transaction.
Throws: - DAOException – unable to roll back the transaction.