intarsys runtime library

de.intarsys.tools.transaction
Class Transaction

java.lang.Object
  extended by de.intarsys.tools.transaction.Transaction
All Implemented Interfaces:
ITransaction, Serializable
Direct Known Subclasses:
RootTransaction, SubTransaction

public abstract class Transaction
extends Object
implements ITransaction, Serializable

A simple transaction implementation.

"Transactional" tasks are delegated to the IResource instances managed by the transaction.

See Also:
Serialized Form

Method Summary
 void commit()
          Commit all changes that belong to this transaction.
 void commitResume()
          Commit all changes that belong to this transaction.
 void delist(IResource resource)
           
 void enlist(IResource resource)
           
 String getId()
           
 void rollback()
          Rollback all changes that belong to this transaction.
 void rollbackResume()
          Rollback all changes that belong to this transaction.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.intarsys.tools.transaction.ITransaction
getParent
 

Method Detail

commit

public void commit()
            throws TransactionException
Description copied from interface: ITransaction
Commit all changes that belong to this transaction. The transaction is no longer usable, all resources are released.

Specified by:
commit in interface ITransaction
Throws:
TransactionException

commitResume

public void commitResume()
                  throws TransactionException
Description copied from interface: ITransaction
Commit all changes that belong to this transaction. The transaction may be reused.

Specified by:
commitResume in interface ITransaction
Throws:
TransactionException

delist

public void delist(IResource resource)
            throws TransactionException
Throws:
TransactionException

enlist

public void enlist(IResource resource)
            throws TransactionException
Throws:
TransactionException

getId

public String getId()

rollback

public void rollback()
              throws TransactionException
Description copied from interface: ITransaction
Rollback all changes that belong to this transaction. The transaction is no longer usable.

Specified by:
rollback in interface ITransaction
Throws:
TransactionException

rollbackResume

public void rollbackResume()
                    throws TransactionException
Description copied from interface: ITransaction
Rollback all changes that belong to this transaction. The transaction may be reused.

Specified by:
rollbackResume in interface ITransaction
Throws:
TransactionException

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.