org.mmbase.storage
Interface Transaction
- All Known Implementing Classes:
- DatabaseTransaction
- public interface Transaction
MMBase transaction object.
Used to maintain context (connection) between separate storage commands (typically database queries),
allowing rollback in complex transactions (if supported).
A transaction is obtained from a Storage object.
- Since:
- MMBase-1.6
- Version:
- $Id: Transaction.java,v 1.1 2002/09/16 15:07:33 pierre Exp $
- Author:
- Pierre van Rooden
|
Method Summary |
boolean |
commit()
Closes the transaction (and commits changes). |
boolean |
rollback()
Rolsl back (cancels) the transaction. |
boolean |
supportsRollback()
Returns true if this transaction supports rollback. |
supportsRollback
public boolean supportsRollback()
- Returns true if this transaction supports rollback.
Rollback of a transaction is defined as making undone ancy changes to the
persistent storage used (i.a. a database), since the transaction started.
- Returns:
- true if the trsansaction supports rollback
commit
public boolean commit()
- Closes the transaction (and commits changes).
If closing fails, the function returns false, rather than throwing an exception
(though the error is logged).
- Returns:
- true if closed successfully
rollback
public boolean rollback()
- Rolsl back (cancels) the transaction.
Some implementations perform rollback.
If cancelling fails, the function returns false, rather than throwing an exception
(though the error is logged).
- Returns:
- true if cancelled successfully
MMBase build 1.6.5.20030923