org.openejb.core
Class CoreUserTransaction

java.lang.Object
  |
  +--org.openejb.core.CoreUserTransaction
All Implemented Interfaces:
java.io.Serializable, javax.transaction.UserTransaction

public class CoreUserTransaction
extends java.lang.Object
implements javax.transaction.UserTransaction, java.io.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: 1.2 $ $Date: 2002/02/25 20:30:58 $
See Also:
Serialized Form

Constructor Summary
CoreUserTransaction()
           
CoreUserTransaction(javax.transaction.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(javax.transaction.TransactionManager txMngr)
Private constructor for singlton.

CoreUserTransaction

public CoreUserTransaction()
Method Detail

begin

public void begin()
           throws javax.transaction.NotSupportedException,
                  javax.transaction.SystemException
Specified by:
begin in interface javax.transaction.UserTransaction

commit

public void commit()
            throws javax.transaction.RollbackException,
                   javax.transaction.HeuristicMixedException,
                   javax.transaction.HeuristicRollbackException,
                   java.lang.SecurityException,
                   java.lang.IllegalStateException,
                   javax.transaction.SystemException
Specified by:
commit in interface javax.transaction.UserTransaction

rollback

public void rollback()
              throws java.lang.IllegalStateException,
                     java.lang.SecurityException,
                     javax.transaction.SystemException
Specified by:
rollback in interface javax.transaction.UserTransaction

getStatus

public int getStatus()
              throws javax.transaction.SystemException
Specified by:
getStatus in interface javax.transaction.UserTransaction

setRollbackOnly

public void setRollbackOnly()
                     throws javax.transaction.SystemException
Specified by:
setRollbackOnly in interface javax.transaction.UserTransaction

setTransactionTimeout

public void setTransactionTimeout(int seconds)
                           throws javax.transaction.SystemException
Specified by:
setTransactionTimeout in interface javax.transaction.UserTransaction