pt.ist.fenixframework.core
Class AbstractTransactionManager

Package class diagram package AbstractTransactionManager
java.lang.Object
  extended by pt.ist.fenixframework.core.AbstractTransactionManager
All Implemented Interfaces:
TransactionManager
Direct Known Subclasses:
MemTransactionManager

public abstract class AbstractTransactionManager
extends Object
implements TransactionManager

Abstract implementation of TransactionManager. This class provides management of CommitListeners, as well as delegating several operations to the underlying transaction.


Constructor Summary
AbstractTransactionManager()
           
 
Method Summary
 void addCommitListener(CommitListener listener)
          Registers a commit listener, that will be called whenever any Transaction managed by this Manager is committed.
protected abstract  void backendCommit()
           
protected abstract  void backendRollback()
           
 void begin()
           
 void commit()
           
 int getStatus()
           
 void removeCommitListener(CommitListener listener)
          Unregisters the given commit listener.
 void rollback()
           
 void setRollbackOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface pt.ist.fenixframework.TransactionManager
begin, getTransaction, withTransaction, withTransaction, withTransaction
 
Methods inherited from interface javax.transaction.TransactionManager
resume, setTransactionTimeout, suspend
 

Constructor Detail

AbstractTransactionManager

public AbstractTransactionManager()
Method Detail

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Specified by:
begin in interface TransactionManager
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Specified by:
commit in interface TransactionManager
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

addCommitListener

public void addCommitListener(CommitListener listener)
Description copied from interface: TransactionManager
Registers a commit listener, that will be called whenever any Transaction managed by this Manager is committed.

Parameters:
listener - The listener to be added.
See Also:
TransactionManager.addCommitListener(pt.ist.fenixframework.CommitListener)

removeCommitListener

public void removeCommitListener(CommitListener listener)
Description copied from interface: TransactionManager
Unregisters the given commit listener.

Parameters:
listener - The listener to be removed.
See Also:
TransactionManager.removeCommitListener(pt.ist.fenixframework.CommitListener)

getStatus

public int getStatus()
              throws SystemException
Specified by:
getStatus in interface TransactionManager
Throws:
SystemException
See Also:
TransactionManager.getStatus()

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Specified by:
rollback in interface TransactionManager
Throws:
IllegalStateException
SecurityException
SystemException
See Also:
TransactionManager.rollback()

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Specified by:
setRollbackOnly in interface TransactionManager
Throws:
IllegalStateException
SystemException
See Also:
TransactionManager.setRollbackOnly()

backendCommit

protected abstract void backendCommit()
                               throws RollbackException,
                                      HeuristicMixedException,
                                      HeuristicRollbackException,
                                      SecurityException,
                                      IllegalStateException,
                                      SystemException
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

backendRollback

protected abstract void backendRollback()
                                 throws SecurityException,
                                        SystemException
Throws:
SecurityException
SystemException


Copyright © 2013. All Rights Reserved.