|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl
public class TransactionCoordinatorImpl
Standard implementation of the Hibernate TransactionCoordinator
Constructor Summary | |
---|---|
TransactionCoordinatorImpl(Connection userSuppliedConnection,
TransactionContext transactionContext)
|
|
TransactionCoordinatorImpl(TransactionContext transactionContext,
JdbcCoordinatorImpl jdbcCoordinator,
List<TransactionObserver> observers)
|
Method Summary | |
---|---|
void |
addObserver(TransactionObserver observer)
Adds an observer to the coordinator. |
void |
afterNonTransactionalQuery(boolean success)
Performs actions needed after execution of a non-transactional query. |
void |
afterTransaction(TransactionImplementor hibernateTransaction,
int status)
|
Connection |
close()
Close the transaction context, returning any user supplied connection from the underlying JDBC coordinator. |
static TransactionCoordinatorImpl |
deserialize(ObjectInputStream ois,
TransactionContext transactionContext)
|
JdbcCoordinator |
getJdbcCoordinator()
Retrieves the JDBC coordinator currently operating within this transaction coordinator. |
SynchronizationCallbackCoordinator |
getSynchronizationCallbackCoordinator()
|
SynchronizationRegistry |
getSynchronizationRegistry()
Obtain the Synchronization registry associated with this coordinator. |
TransactionImplementor |
getTransaction()
Get the Hibernate transaction facade object currently associated with this coordinator. |
TransactionContext |
getTransactionContext()
Retrieves the context in which this coordinator operates. |
boolean |
isSynchronizationRegistered()
|
boolean |
isTransactionInProgress()
Are we "in" an active and joined transaction |
boolean |
isTransactionJoinable()
Can we join to the underlying transaction? |
boolean |
isTransactionJoined()
Is the underlying transaction already joined? |
void |
pulse()
Attempts to register JTA synchronization if possible and needed. |
void |
removeObserver(TransactionObserver observer)
Removed an observer from the coordinator. |
void |
reset()
Reset the internal state. |
void |
resetJoinStatus()
Reset the transaction's join status. |
void |
sendAfterTransactionBeginNotifications(TransactionImplementor hibernateTransaction)
|
void |
sendAfterTransactionCompletionNotifications(TransactionImplementor hibernateTransaction,
int status)
|
void |
sendBeforeTransactionCompletionNotifications(TransactionImplementor hibernateTransaction)
|
void |
serialize(ObjectOutputStream oos)
|
void |
setRollbackOnly()
|
boolean |
takeOwnership()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TransactionCoordinatorImpl(Connection userSuppliedConnection, TransactionContext transactionContext)
public TransactionCoordinatorImpl(TransactionContext transactionContext, JdbcCoordinatorImpl jdbcCoordinator, List<TransactionObserver> observers)
Method Detail |
---|
public void reset()
public void afterTransaction(TransactionImplementor hibernateTransaction, int status)
afterTransaction
in interface TransactionCoordinator
public boolean isSynchronizationRegistered()
isSynchronizationRegistered
in interface TransactionCoordinator
public boolean isTransactionInProgress()
TransactionCoordinator
isTransactionInProgress
in interface TransactionCoordinator
public TransactionContext getTransactionContext()
TransactionCoordinator
getTransactionContext
in interface TransactionCoordinator
public JdbcCoordinator getJdbcCoordinator()
TransactionCoordinator
getJdbcCoordinator
in interface TransactionCoordinator
public TransactionImplementor getTransaction()
TransactionCoordinator
getTransaction
in interface TransactionCoordinator
public void afterNonTransactionalQuery(boolean success)
TransactionCoordinator
afterNonTransactionalQuery
in interface TransactionCoordinator
success
- Was the query successfully performedpublic void resetJoinStatus()
TransactionCoordinator
resetJoinStatus
in interface TransactionCoordinator
public SynchronizationCallbackCoordinator getSynchronizationCallbackCoordinator()
getSynchronizationCallbackCoordinator
in interface TransactionCoordinator
public void pulse()
TransactionCoordinator
pulse
in interface TransactionCoordinator
public Connection close()
TransactionCoordinator
close
in interface TransactionCoordinator
public SynchronizationRegistry getSynchronizationRegistry()
TransactionCoordinator
Synchronization
registry associated with this coordinator.
getSynchronizationRegistry
in interface TransactionCoordinator
public void addObserver(TransactionObserver observer)
TransactionCoordinator
registry
, observers are not to be
cleared on transaction completion.
addObserver
in interface TransactionCoordinator
observer
- The observer to add.public void removeObserver(TransactionObserver observer)
TransactionCoordinator
removeObserver
in interface TransactionCoordinator
observer
- The observer to remove.public boolean isTransactionJoinable()
TransactionCoordinator
isTransactionJoinable
in interface TransactionCoordinator
TransactionFactory.isJoinableJtaTransaction(TransactionCoordinator, TransactionImplementor)
public boolean isTransactionJoined()
TransactionCoordinator
isTransactionJoined
in interface TransactionCoordinator
public void setRollbackOnly()
setRollbackOnly
in interface TransactionCoordinator
public boolean takeOwnership()
takeOwnership
in interface TransactionCoordinator
public void sendAfterTransactionBeginNotifications(TransactionImplementor hibernateTransaction)
sendAfterTransactionBeginNotifications
in interface TransactionCoordinator
public void sendBeforeTransactionCompletionNotifications(TransactionImplementor hibernateTransaction)
sendBeforeTransactionCompletionNotifications
in interface TransactionCoordinator
public void sendAfterTransactionCompletionNotifications(TransactionImplementor hibernateTransaction, int status)
sendAfterTransactionCompletionNotifications
in interface TransactionCoordinator
public void serialize(ObjectOutputStream oos) throws IOException
IOException
public static TransactionCoordinatorImpl deserialize(ObjectInputStream ois, TransactionContext transactionContext) throws ClassNotFoundException, IOException
ClassNotFoundException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |