|
Dashboard Builder Commons 6.2.0.Beta2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.dashboard.database.hibernate.HibernateTransaction
public class HibernateTransaction
A Hibernate transaction in the platform is always tied to a single thread. Every time a thread is executed an instance of this class is created and bounded to the current thread. The standard way to interact with the underlying transaction is to make use of the HibernateTxFragment idiom.
HibernateTxFragment| Field Summary | |
|---|---|
protected org.hibernate.Transaction |
tx
The underlying Hibernate transaction |
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected org.hibernate.Transaction tx
| Method Detail |
|---|
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 begin()
throws Exception
Exceptionpublic 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
Exceptionprotected 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
|
Dashboard Builder Commons 6.2.0.Beta2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||