org.openejb.core
Class CoreUserTransaction

java.lang.Object
  extended by org.openejb.core.CoreUserTransaction
All Implemented Interfaces:
Serializable, UserTransaction

public class CoreUserTransaction
extends Object
implements UserTransaction, Serializable

Implements the bean's UserTransaction interface into the transaction monitor. A bean should only obtain access to this interface if the transaction is bean managed. This interface prevents the bean from marking the transaction as roll back only as per the EJB specification.

Version:
$Revision: 1921 $ $Date: 2005-06-19 15:40:34 -0700 (Sun, 19 Jun 2005) $
Author:
Assaf Arkin, Richard Monson-Haefel
See Also:
Serialized Form

Constructor Summary
CoreUserTransaction()
           
CoreUserTransaction(TransactionManager txMngr)
          Private constructor for singlton.
 
Method Summary
 void begin()
           
 void commit()
           
 int getStatus()
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int seconds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoreUserTransaction

public CoreUserTransaction(TransactionManager txMngr)
Private constructor for singlton.


CoreUserTransaction

public CoreUserTransaction()
Method Detail

begin

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

commit

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

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Specified by:
rollback in interface UserTransaction
Throws:
IllegalStateException
SecurityException
SystemException

getStatus

public int getStatus()
              throws SystemException
Specified by:
getStatus in interface UserTransaction
Throws:
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws SystemException
Specified by:
setRollbackOnly in interface UserTransaction
Throws:
SystemException

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws SystemException
Specified by:
setTransactionTimeout in interface UserTransaction
Throws:
SystemException


Copyright © 1999-2012 OpenEJB. All Rights Reserved.