org.mmbase.bridge.implementation
Class BasicTransaction

java.lang.Object
  |
  +--org.mmbase.bridge.implementation.BasicCloud
        |
        +--org.mmbase.bridge.implementation.BasicTransaction
All Implemented Interfaces:
java.lang.Cloneable, Cloud, Transaction

public class BasicTransaction
extends BasicCloud
implements Transaction

Author:
Pierre van Rooden

Field Summary
protected  java.lang.String transactionContext
          The id of the transaction for use with the transaction manager.
protected  java.lang.String transactionName
          The name of the transaction as used by the user.
 
Fields inherited from class org.mmbase.bridge.implementation.BasicCloud
account, description, language, name, nodeManagerCache, parentCloud, relationManagerCache, transactions, userContext
 
Method Summary
 void cancel()
          Cancels this transaction.
 boolean commit()
          Commits this transaction.
protected  void finalize()
          If this Transaction is scheduled to be garbage collected, the transaction is canceled and cleaned up (unless it has already been committed/canceled, ofcourse, and unless the parentcloud of a transaction is a transaction itself...
 
Methods inherited from class org.mmbase.bridge.implementation.BasicCloud
createTransaction, createTransaction, createTransaction, getCloudContext, getDescription, getList, getName, getNode, getNode, getNodeByAlias, getNodeManager, getNodeManagers, getRelationManager, getRelationManager, getRelationManagers, getTransaction, getUser
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.mmbase.bridge.Cloud
createTransaction, createTransaction, createTransaction, getCloudContext, getDescription, getList, getName, getNode, getNode, getNodeByAlias, getNodeManager, getNodeManagers, getRelationManager, getRelationManager, getRelationManagers, getTransaction, getUser
 

Field Detail

transactionContext

protected java.lang.String transactionContext
The id of the transaction for use with the transaction manager.

transactionName

protected java.lang.String transactionName
The name of the transaction as used by the user.
Method Detail

commit

public boolean commit()
Description copied from interface: Transaction
Commits this transaction. This has no effect if the transaction itself was 'nested' in another transaction. In that case, nothing happens until the 'outer' transaction commits. This routine also removes the transaction as an 'active' transaction (it cannot be opened again).
Specified by:
commit in interface Transaction
Following copied from interface: org.mmbase.bridge.Transaction
Returns:
true if the commit succeeded, false otherwise

cancel

public void cancel()
Description copied from interface: Transaction
Cancels this transaction. If the transaction itself was 'nested' in another transaction, that 'outer' transaction is also canceled. This routine also removes the transaction (and all outer transactions) as an 'active' transaction (it cannot be opened again).
Specified by:
cancel in interface Transaction

finalize

protected void finalize()
If this Transaction is scheduled to be garbage collected, the transaction is canceled and cleaned up (unless it has already been committed/canceled, ofcourse, and unless the parentcloud of a transaction is a transaction itself... in that case, the parent transaction should cancel!). This means that a transaction is always cleared - if it 'times out', or is not properly removed, it will eventually be removed from the MMBase cache.
Overrides:
finalize in class java.lang.Object


MMBase 2001