com.sun.enterprise.transaction
Class UserTransactionImpl

java.lang.Object
  extended by com.sun.enterprise.transaction.UserTransactionImpl
All Implemented Interfaces:
java.io.Serializable, UserTransaction

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class UserTransactionImpl
extends java.lang.Object
implements UserTransaction, java.io.Serializable

This class implements javax.transaction.UserTransaction . Its methods are called from TX_BEAN_MANAGED EJB code. Most of its methods just delegate to the TransactionManager after doing some EJB Container-related steps. Note: EJB1.1 Section 6.4.1 requires that the Container must be able to preserve an object reference of the UserTransaction interface across passivation, so we make this Serializable.

Author:
Tony Ng, Marina Vatkina
See Also:
Serialized Form

Constructor Summary
UserTransactionImpl()
          Default constructor.
UserTransactionImpl(boolean doEjbAccessChecks)
          Alternate version of constructor that allows control over whether ejb access checks are performed.
 
Method Summary
 void begin()
           
 void commit()
           
 int getStatus()
           
 void rollback()
           
 void setForTesting(JavaEETransactionManager tm, InvocationManager im)
           
 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

UserTransactionImpl

public UserTransactionImpl()
Default constructor.


UserTransactionImpl

public UserTransactionImpl(boolean doEjbAccessChecks)
Alternate version of constructor that allows control over whether ejb access checks are performed.

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,
                   java.lang.SecurityException,
                   java.lang.IllegalStateException,
                   SystemException
Specified by:
commit in interface UserTransaction
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
java.lang.SecurityException
java.lang.IllegalStateException
SystemException

rollback

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

setRollbackOnly

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

getStatus

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

setTransactionTimeout

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

setForTesting

public void setForTesting(JavaEETransactionManager tm,
                          InvocationManager im)


Copyright © 2012 GlassFish Community. All Rights Reserved.