org.jboss.seam.transaction
Class HibernateTransaction
java.lang.Object
org.jboss.seam.transaction.AbstractUserTransaction
org.jboss.seam.transaction.HibernateTransaction
- All Implemented Interfaces:
- UserTransaction
@Name(value="org.jboss.seam.transaction.transaction")
@Scope(value=EVENT)
@Install(value=false,
precedence=10)
@BypassInterceptors
public class HibernateTransaction
- extends AbstractUserTransaction
Support for the Hibernate Transaction API.
Adapts Hibernate transaction management to a Seam UserTransaction
interface. For use in non-JTA-capable environments.
- Author:
- Gavin King
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HibernateTransaction
public HibernateTransaction()
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
enlist
public void enlist(javax.persistence.EntityManager entityManager)
throws SystemException
- Overrides:
enlist
in class AbstractUserTransaction
- Throws:
SystemException
isConversationContextRequired
public boolean isConversationContextRequired()
- Overrides:
isConversationContextRequired
in class AbstractUserTransaction
getSession
public Expressions.ValueExpression<org.hibernate.Session> getSession()
setSession
public void setSession(Expressions.ValueExpression<org.hibernate.Session> entityManager)