|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hibernate.engine.transaction.spi.AbstractTransactionImpl
public abstract class AbstractTransactionImpl
Abstract support for creating transaction implementations
| Constructor Summary | |
|---|---|
protected |
AbstractTransactionImpl(TransactionCoordinator transactionCoordinator)
|
| Method Summary | |
|---|---|
protected abstract void |
afterAfterCompletion()
|
protected abstract void |
afterTransactionBegin()
|
protected abstract void |
afterTransactionCompletion(int status)
|
protected boolean |
allowFailedCommitToPhysicallyRollback()
|
protected abstract void |
beforeTransactionCommit()
|
protected abstract void |
beforeTransactionRollBack()
|
void |
begin()
Begin this transaction. |
void |
commit()
Commit this transaction. |
protected abstract void |
doBegin()
Perform the actual steps of beginning a transaction according to the strategy. |
protected abstract void |
doCommit()
Perform the actual steps of committing a transaction according to the strategy. |
protected boolean |
doExtendedActiveCheck()
Active has been checked against local state. |
protected abstract void |
doRollback()
Perform the actual steps of rolling back a transaction according to the strategy. |
LocalStatus |
getLocalStatus()
Get the current local status of this transaction. |
int |
getTimeout()
Retrieve the transaction timeout set for this transaction. |
void |
invalidate()
Called after completion of the underlying transaction to signify the facade is no longer valid. |
boolean |
isActive()
Is this transaction still active? Answers on a best effort basis. |
boolean |
isParticipating()
Is Hibernate participating in the underlying transaction? Generally speaking this will be the same as Transaction.isActive(). |
void |
join()
Perform a join to the underlying transaction |
protected JtaPlatform |
jtaPlatform()
Provide subclasses with convenient access to the configured JtaPlatform |
void |
markForJoin()
Mark a transaction as joinable |
void |
registerSynchronization(Synchronization synchronization)
Register a user synchronization callback for this transaction. |
void |
resetJoinStatus()
Reset this transaction's join status. |
void |
rollback()
Rollback this transaction. |
void |
setTimeout(int seconds)
Set the transaction timeout for any transaction started by a subsequent call to Transaction.begin() on this instance. |
protected TransactionCoordinator |
transactionCoordinator()
Provide subclasses with access to the transaction coordinator. |
boolean |
wasCommitted()
Was this transaction committed? Answers on a best effort basis. |
boolean |
wasRolledBack()
Was this transaction rolled back or set to rollback only? Answers on a best effort basis. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.hibernate.engine.transaction.spi.TransactionImplementor |
|---|
createIsolationDelegate, getJoinStatus, markRollbackOnly |
| Methods inherited from interface org.hibernate.Transaction |
|---|
isInitiator |
| Constructor Detail |
|---|
protected AbstractTransactionImpl(TransactionCoordinator transactionCoordinator)
| Method Detail |
|---|
public void invalidate()
TransactionImplementor
invalidate in interface TransactionImplementorprotected abstract void doBegin()
TransactionException - Indicates a problem beginning the transactionprotected abstract void doCommit()
TransactionException - Indicates a problem committing the transactionprotected abstract void doRollback()
TransactionException - Indicates a problem rolling back the transactionprotected abstract void afterTransactionBegin()
protected abstract void beforeTransactionCommit()
protected abstract void beforeTransactionRollBack()
protected abstract void afterTransactionCompletion(int status)
protected abstract void afterAfterCompletion()
protected TransactionCoordinator transactionCoordinator()
protected JtaPlatform jtaPlatform()
JtaPlatform
JtaPlatformpublic void registerSynchronization(Synchronization synchronization)
Transaction
registerSynchronization in interface Transactionsynchronization - The Synchronization callback to register.public LocalStatus getLocalStatus()
Transaction
getLocalStatus in interface Transactionpublic boolean isActive()
TransactionConnection, only when
it is initiated from here.
isActive in interface Transactiontrue if the transaction is still active; false otherwise.public boolean isParticipating()
TransactionTransaction.isActive().
isParticipating in interface Transactiontrue if Hibernate is known to be participating in the underlying transaction; false
otherwise.public boolean wasCommitted()
TransactionConnection,
only when the commit was done from this.
wasCommitted in interface Transactiontrue if the transaction is rolled back; false otherwise.
public boolean wasRolledBack()
throws HibernateException
TransactionConnection,
only when it was rolled back from here.
wasRolledBack in interface TransactionHibernateException - Indicates a problem checking the transaction status.protected boolean doExtendedActiveCheck()
true if the extended active check checks out as well; false otherwise.
public void begin()
throws HibernateException
TransactionTransaction.commit() or Transaction.rollback() will error.
begin in interface TransactionHibernateException - Indicates a problem beginning the transaction.
public void commit()
throws HibernateException
Transactioninitiator, Session.flush() the Session
with which it is associated (unless Session is in FlushMode.MANUAL).
initiator, commit the underlying transaction.
commit in interface TransactionHibernateException - Indicates a problem committing the transaction.protected boolean allowFailedCommitToPhysicallyRollback()
public void rollback()
throws HibernateException
Transaction
rollback in interface TransactionHibernateException - Indicates a problem rolling back the transaction.public void setTimeout(int seconds)
TransactionTransaction.begin() on this instance.
setTimeout in interface Transactionseconds - The number of seconds before a timeout.public int getTimeout()
Transaction
getTimeout in interface Transactionpublic void markForJoin()
TransactionImplementor
markForJoin in interface TransactionImplementorpublic void join()
TransactionImplementor
join in interface TransactionImplementorpublic void resetJoinStatus()
TransactionImplementor
resetJoinStatus in interface TransactionImplementor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||