Seam Core JSF2 2.3.1.Final

org.jboss.seam.transaction
Class EntityTransaction

java.lang.Object
  extended by org.jboss.seam.transaction.AbstractUserTransaction
      extended by org.jboss.seam.transaction.EntityTransaction
All Implemented Interfaces:
UserTransaction

@Name(value="org.jboss.seam.transaction.transaction")
@Scope(value=EVENT)
@Install(value=false,
         precedence=10)
@BypassInterceptors
public class EntityTransaction
extends AbstractUserTransaction

Support for the JPA EntityTransaction API. Adapts JPA transaction management to a Seam UserTransaction interface.For use in non-JTA-capable environments.

Author:
Gavin King

Constructor Summary
EntityTransaction()
           
 
Method Summary
 void begin()
           
 void commit()
           
 void enlist(javax.persistence.EntityManager entityManager)
           
 Expressions.ValueExpression<javax.persistence.EntityManager> getEntityManager()
           
 int getStatus()
           
 boolean isConversationContextRequired()
           
 void registerSynchronization(Synchronization sync)
           
 void rollback()
           
 void setEntityManager(Expressions.ValueExpression<javax.persistence.EntityManager> entityManager)
           
 void setRollbackOnly()
           
 void setTransactionTimeout(int timeout)
           
 void validate()
           
 
Methods inherited from class org.jboss.seam.transaction.AbstractUserTransaction
getSynchronizations, isActive, isActiveOrMarkedRollback, isCommitted, isMarkedRollback, isNoTransaction, isRolledBack, isRolledBackOrMarkedRollback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityTransaction

public EntityTransaction()
Method Detail

validate

@Create
public void validate()

begin

public void begin()
           throws NotSupportedException,
                  SystemException
Throws:
NotSupportedException
SystemException

commit

public void commit()
            throws RollbackException,
                   HeuristicMixedException,
                   HeuristicRollbackException,
                   SecurityException,
                   IllegalStateException,
                   SystemException
Throws:
RollbackException
HeuristicMixedException
HeuristicRollbackException
SecurityException
IllegalStateException
SystemException

rollback

public void rollback()
              throws IllegalStateException,
                     SecurityException,
                     SystemException
Throws:
IllegalStateException
SecurityException
SystemException

setRollbackOnly

public void setRollbackOnly()
                     throws IllegalStateException,
                            SystemException
Throws:
IllegalStateException
SystemException

getStatus

public int getStatus()
              throws SystemException
Throws:
SystemException

setTransactionTimeout

public void setTransactionTimeout(int timeout)
                           throws SystemException
Throws:
SystemException

registerSynchronization

public void registerSynchronization(Synchronization sync)
Specified by:
registerSynchronization in class AbstractUserTransaction

isConversationContextRequired

public boolean isConversationContextRequired()
Overrides:
isConversationContextRequired in class AbstractUserTransaction

getEntityManager

public Expressions.ValueExpression<javax.persistence.EntityManager> getEntityManager()

setEntityManager

public void setEntityManager(Expressions.ValueExpression<javax.persistence.EntityManager> entityManager)

enlist

public void enlist(javax.persistence.EntityManager entityManager)
Overrides:
enlist in class AbstractUserTransaction

Seam Core JSF2 2.3.1.Final

Copyright © 2013 Seam Framework. All Rights Reserved.