|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.engine.transaction.spi.AbstractTransactionImpl
org.hibernate.engine.transaction.internal.jta.CMTTransaction
public class CMTTransaction
Implements a transaction strategy for Container Managed Transaction (CMT) scenarios. All work is done in the context of the container managed transaction.
The term 'CMT' is potentially misleading; the pertinent point simply being that the transactions are being managed by something other than the Hibernate transaction mechanism. Additionally, this strategy does *not* attempt to access or use theUserTransaction since
in the actual case CMT access to the UserTransaction is explicitly disallowed. Instead
we use the JTA Transaction object obtained from the TransactionManager
| Constructor Summary | |
|---|---|
protected |
CMTTransaction(TransactionCoordinator transactionCoordinator)
|
| Method Summary | |
|---|---|
protected void |
afterAfterCompletion()
|
protected void |
afterTransactionBegin()
|
protected void |
afterTransactionCompletion(int status)
|
protected void |
beforeTransactionCommit()
|
protected void |
beforeTransactionRollBack()
|
IsolationDelegate |
createIsolationDelegate()
Retrieve an isolation delegate appropriate for this transaction strategy. |
protected void |
doBegin()
Perform the actual steps of beginning a transaction according to the strategy. |
protected void |
doCommit()
Perform the actual steps of committing a transaction according to the strategy. |
protected void |
doRollback()
Perform the actual steps of rolling back a transaction according to the strategy. |
JoinStatus |
getJoinStatus()
Get the current state of this transaction's join status. |
boolean |
isActive()
Is this transaction still active? Answers on a best effort basis. |
boolean |
isInitiator()
Is this transaction the initiator of any underlying transaction? |
void |
join()
Perform a join to the underlying transaction |
void |
markForJoin()
Mark a transaction as joinable |
void |
markRollbackOnly()
Make a best effort to mark the underlying transaction for rollback only. |
void |
resetJoinStatus()
Reset this transaction's join status. |
protected TransactionManager |
transactionManager()
|
| Methods inherited from class org.hibernate.engine.transaction.spi.AbstractTransactionImpl |
|---|
allowFailedCommitToPhysicallyRollback, begin, commit, doExtendedActiveCheck, getLocalStatus, getTimeout, invalidate, isParticipating, jtaPlatform, registerSynchronization, rollback, setTimeout, transactionCoordinator, wasCommitted, wasRolledBack |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected CMTTransaction(TransactionCoordinator transactionCoordinator)
| Method Detail |
|---|
protected TransactionManager transactionManager()
protected void doBegin()
AbstractTransactionImpl
doBegin in class AbstractTransactionImplprotected void afterTransactionBegin()
afterTransactionBegin in class AbstractTransactionImplprotected void beforeTransactionCommit()
beforeTransactionCommit in class AbstractTransactionImplprotected void doCommit()
AbstractTransactionImpl
doCommit in class AbstractTransactionImplprotected void beforeTransactionRollBack()
beforeTransactionRollBack in class AbstractTransactionImplprotected void doRollback()
AbstractTransactionImpl
doRollback in class AbstractTransactionImplprotected void afterTransactionCompletion(int status)
afterTransactionCompletion in class AbstractTransactionImplprotected void afterAfterCompletion()
afterAfterCompletion in class AbstractTransactionImpl
public boolean isActive()
throws TransactionException
TransactionConnection, only when
it is initiated from here.
isActive in interface TransactionisActive in class AbstractTransactionImpltrue if the transaction is still active; false otherwise.
TransactionExceptionpublic IsolationDelegate createIsolationDelegate()
TransactionImplementor
public boolean isInitiator()
Transaction
true if this transaction initiated the underlying transaction; false otherwise.public void markRollbackOnly()
TransactionImplementor
public void markForJoin()
TransactionImplementor
markForJoin in interface TransactionImplementormarkForJoin in class AbstractTransactionImplpublic void join()
TransactionImplementor
join in interface TransactionImplementorjoin in class AbstractTransactionImplpublic void resetJoinStatus()
TransactionImplementor
resetJoinStatus in interface TransactionImplementorresetJoinStatus in class AbstractTransactionImplpublic JoinStatus getJoinStatus()
TransactionImplementor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||