org.jboss.seam.transaction
Class DefaultSeamTransaction
java.lang.Object
org.jboss.seam.transaction.DefaultSeamTransaction
- All Implemented Interfaces:
- UserTransaction, org.jboss.seam.transaction.SeamTransaction
@DefaultBean(value=org.jboss.seam.transaction.SeamTransaction.class)
@DefaultTransaction
public class DefaultSeamTransaction
- extends Object
- implements org.jboss.seam.transaction.SeamTransaction
Supports injection of a Seam UserTransaction object that wraps the current
JTA transaction or EJB container managed transaction.
- Author:
- Stuart Douglas
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ejbContextName
public static String ejbContextName
STANDARD_EJB_CONTEXT_NAME
public static final String STANDARD_EJB_CONTEXT_NAME
- See Also:
- Constant Field Values
DefaultSeamTransaction
public DefaultSeamTransaction()
enlist
public void enlist(javax.persistence.EntityManager entityManager)
throws SystemException
- Specified by:
enlist
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isActive
public boolean isActive()
throws SystemException
- Specified by:
isActive
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isActiveOrMarkedRollback
public boolean isActiveOrMarkedRollback()
throws SystemException
- Specified by:
isActiveOrMarkedRollback
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isCommitted
public boolean isCommitted()
throws SystemException
- Specified by:
isCommitted
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isConversationContextRequired
public boolean isConversationContextRequired()
- Specified by:
isConversationContextRequired
in interface org.jboss.seam.transaction.SeamTransaction
isMarkedRollback
public boolean isMarkedRollback()
throws SystemException
- Specified by:
isMarkedRollback
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isNoTransaction
public boolean isNoTransaction()
throws SystemException
- Specified by:
isNoTransaction
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isRolledBack
public boolean isRolledBack()
throws SystemException
- Specified by:
isRolledBack
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
isRolledBackOrMarkedRollback
public boolean isRolledBackOrMarkedRollback()
throws SystemException
- Specified by:
isRolledBackOrMarkedRollback
in interface org.jboss.seam.transaction.SeamTransaction
- Throws:
SystemException
registerSynchronization
public void registerSynchronization(Synchronization sync)
- Specified by:
registerSynchronization
in interface org.jboss.seam.transaction.SeamTransaction
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
getStatus
public int getStatus()
throws SystemException
- Specified by:
getStatus
in interface UserTransaction
- Throws:
SystemException
rollback
public void rollback()
throws IllegalStateException,
SecurityException,
SystemException
- Specified by:
rollback
in interface UserTransaction
- Throws:
IllegalStateException
SecurityException
SystemException
setRollbackOnly
public void setRollbackOnly()
throws IllegalStateException,
SystemException
- Specified by:
setRollbackOnly
in interface UserTransaction
- Throws:
IllegalStateException
SystemException
setTransactionTimeout
public void setTransactionTimeout(int seconds)
throws SystemException
- Specified by:
setTransactionTimeout
in interface UserTransaction
- Throws:
SystemException
getSeamTransaction
protected org.jboss.seam.transaction.SeamTransaction getSeamTransaction()
createNoTransaction
protected org.jboss.seam.transaction.SeamTransaction createNoTransaction()
createCMTTransaction
protected org.jboss.seam.transaction.SeamTransaction createCMTTransaction()
throws NamingException
- Throws:
NamingException
createUTTransaction
protected org.jboss.seam.transaction.SeamTransaction createUTTransaction()
throws NamingException
- Throws:
NamingException
getUserTransaction
protected UserTransaction getUserTransaction()
throws NamingException
- Throws:
NamingException
getEJBContext
public static javax.ejb.EJBContext getEJBContext()
throws NamingException
- Throws:
NamingException
getEjbContextName
protected static String getEjbContextName()
setEjbContextName
protected static void setEjbContextName(String ejbContextName)
Copyright © 2011 Seam Framework. All Rights Reserved.