org.mmbase.storage
Interface Transaction

All Known Implementing Classes:
DatabaseTransaction

Deprecated. This code is scheduled for removal once MMBase has been fully converted to the new StorageManager implementation.

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.2 2004/01/27 12:04:45 pierre Exp $
Author:
Pierre van Rooden

Method Summary
 boolean commit()
          Deprecated. Closes the transaction (and commits changes).
 boolean rollback()
          Deprecated. Rolsl back (cancels) the transaction.
 boolean supportsRollback()
          Deprecated. Returns true if this transaction supports rollback.
 

Method Detail

supportsRollback

public boolean supportsRollback()
Deprecated. 
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()
Deprecated. 
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()
Deprecated. 
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.7.1.20041002