public abstract class AbstractTransactionImpl extends Object implements TransactionImplementor
transaction implementations| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTransactionImpl(TransactionCoordinator transactionCoordinator) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateIsolationDelegate, getJoinStatus, markRollbackOnlyisInitiatorprotected AbstractTransactionImpl(TransactionCoordinator transactionCoordinator)
public void invalidate()
TransactionImplementorinvalidate 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()
JtaPlatformJtaPlatformpublic void registerSynchronization(Synchronization synchronization)
TransactionregisterSynchronization in interface Transactionsynchronization - The Synchronization callback to register.public LocalStatus getLocalStatus()
TransactiongetLocalStatus 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
Transactionrollback 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()
TransactiongetTimeout in interface Transactionpublic void markForJoin()
TransactionImplementormarkForJoin in interface TransactionImplementorpublic void join()
TransactionImplementorjoin in interface TransactionImplementorpublic void resetJoinStatus()
TransactionImplementorresetJoinStatus in interface TransactionImplementorCopyright © 2018 JBoss by Red Hat. All rights reserved.