|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.hibernate.transaction.JTATransaction
Implements a basic transaction strategy for JTA transactions. Instances check to
see if there is an existing JTA transaction. If none exists, a new transaction
is started. If one exists, all work is done in the existing context. The
following properties are used to locate the underlying UserTransaction:
hibernate.jndi.url | JNDI initial context URL |
hibernate.jndi.class | JNDI provider class |
jta.UserTransaction | JNDI name |
Constructor Summary | |
JTATransaction(SessionImplementor session)
|
Method Summary | |
void |
begin(InitialContext context,
String utName,
TransactionManager transactionManager)
|
void |
commit()
Flush the associated Session and end the unit of work. |
void |
rollback()
Force the underlying transaction to roll back. |
boolean |
wasCommitted()
Check if this transaction was successfully committed. |
boolean |
wasRolledBack()
Was this transaction rolled back or set to rollback only? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public JTATransaction(SessionImplementor session)
Method Detail |
public void commit() throws HibernateException
Transaction
commit
in interface Transaction
HibernateException
public void rollback() throws HibernateException
Transaction
rollback
in interface Transaction
HibernateException
public void begin(InitialContext context, String utName, TransactionManager transactionManager) throws HibernateException
HibernateException
public boolean wasRolledBack() throws TransactionException
Transaction
wasRolledBack
in interface Transaction
TransactionException
public boolean wasCommitted() throws TransactionException
Transaction
wasCommitted
in interface Transaction
TransactionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |