public class HibernateTransaction extends Object
HibernateTxFragment
Modifier and Type | Field and Description |
---|---|
protected org.hibernate.Transaction |
tx
The underlying Hibernate transaction
|
Modifier and Type | Method and Description |
---|---|
void |
begin()
Begin the transaction
|
protected void |
close()
Flush the transaction
|
protected void |
commit()
Commit the transaction
|
void |
complete()
Complete the transaction
|
void |
error(Throwable t)
Exception occurred during a transaction fragment
|
protected void |
executeFragment(HibernateTxFragment fragment) |
protected void |
flush()
Flush the transaction
|
static HibernateTransaction |
getCurrentTx()
Get the current tx associated with the calling thread.
|
protected HibernateTxFragment |
getFlusherFragment()
Get the first fragment in the chain than has the flush flag enabled.
|
String |
getId() |
org.hibernate.Session |
getSession() |
boolean |
isActive() |
boolean |
isRollback() |
protected void |
notifyAfterCommit(HibernateTxFragment fragment) |
protected void |
notifyAfterRollback(HibernateTxFragment fragment) |
protected void |
notifyBeforeCommit(HibernateTxFragment fragment) |
protected void |
notifyBeforeRollback(HibernateTxFragment fragment) |
protected void |
notifyListener(boolean before,
HibernateTxFragment listener)
Invoke the callbacks on a listener
|
protected void |
notifyListeners(boolean before)
Invoke the callbacks on listeners
|
protected void |
rollback()
Rollback the transaction
|
static Object |
runWork(HibernateWork work) |
void |
setId(String id) |
void |
setRollback(boolean rollback) |
public static HibernateTransaction getCurrentTx()
public String getId()
public void setId(String id)
public org.hibernate.Session getSession()
public boolean isRollback()
public void setRollback(boolean rollback)
public boolean isActive()
public void complete()
protected void flush()
protected void close()
protected void rollback()
protected void commit()
public void error(Throwable t)
protected final void executeFragment(HibernateTxFragment fragment) throws Exception
Exception
protected HibernateTxFragment getFlusherFragment()
protected void notifyListeners(boolean before)
protected void notifyListener(boolean before, HibernateTxFragment listener)
protected void notifyBeforeCommit(HibernateTxFragment fragment)
protected void notifyBeforeRollback(HibernateTxFragment fragment)
protected void notifyAfterCommit(HibernateTxFragment fragment)
protected void notifyAfterRollback(HibernateTxFragment fragment)
public static Object runWork(HibernateWork work) throws Throwable
Throwable
Copyright © 2012-2015 JBoss by Red Hat. All Rights Reserved.