tyrex.tm.impl
Class UserTransactionImpl

java.lang.Object
  extended bytyrex.tm.impl.UserTransactionImpl
All Implemented Interfaces:
javax.transaction.UserTransaction

public final class UserTransactionImpl
extends java.lang.Object
implements javax.transaction.UserTransaction

Simple implementation of the UserTransaction interface. This is a local implementation exposed to local users through JNDI lookup or through the application server. This interface is decoupled from TransactionManagerImpl to prevent unwanted casting, since the later is public.

To obtain the user transaction use either Tyrex or look it up through JNDI (java:/comp/UserTransaction).

Version:
$Revision: 1.2 $ $Date: 2001/03/12 19:20:20 $
Author:
Assaf Arkin

Constructor Summary
UserTransactionImpl(TransactionManagerImpl txManager)
          Private constructor.
 
Method Summary
 void begin()
           
 void commit()
           
 int getStatus()
           
 void rollback()
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int timeout)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserTransactionImpl

public UserTransactionImpl(TransactionManagerImpl txManager)
Private constructor.

Method Detail

begin

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

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
Throws:
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
javax.transaction.SystemException

rollback

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

getStatus

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

setRollbackOnly

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

setTransactionTimeout

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


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.