public class JtaTransactionCoordinatorImpl extends Object implements TransactionCoordinator, SynchronizationCallbackTarget
Modifier and Type | Class and Description |
---|---|
class |
JtaTransactionCoordinatorImpl.TransactionDriverControlImpl
Implementation of the LocalInflow for this TransactionCoordinator.
|
TransactionCoordinator.TransactionDriver
Constructor and Description |
---|
JtaTransactionCoordinatorImpl(TransactionCoordinatorBuilder transactionCoordinatorBuilder,
TransactionCoordinatorOwner owner,
boolean autoJoinTransactions,
JtaPlatform jtaPlatform,
boolean preferUserTransactions,
boolean performJtaThreadTracking,
TransactionObserver... observers) |
Modifier and Type | Method and Description |
---|---|
void |
addObserver(TransactionObserver observer)
Adds an observer to the coordinator.
|
void |
afterCompletion(boolean successful,
boolean delayed)
Callback of after-completion.
|
void |
beforeCompletion()
Callback of before-completion.
|
IsolationDelegate |
createIsolationDelegate()
Retrieve an isolation delegate appropriate for this transaction strategy.
|
void |
explicitJoin()
Indicates an explicit request to join a transaction.
|
JpaCompliance |
getJpaCompliance() |
SynchronizationRegistry |
getLocalSynchronizations()
Get access to the local registry of Synchronization instances
|
SynchronizationCallbackCoordinator |
getSynchronizationCallbackCoordinator() |
int |
getTimeOut() |
TransactionCoordinatorBuilder |
getTransactionCoordinatorBuilder()
Access to the builder that generated this coordinator
|
TransactionCoordinatorOwner |
getTransactionCoordinatorOwner() |
TransactionCoordinator.TransactionDriver |
getTransactionDriverControl()
Get the delegate used by the local transaction driver to control the underlying transaction
|
void |
invalidate() |
boolean |
isActive()
Is this transaction still active?
Answers on a best effort basis.
|
boolean |
isJoined()
Determine if there is an active transaction that this coordinator is already joined to.
|
boolean |
isJtaTransactionCurrentlyActive() |
boolean |
isSynchronizationRegistered()
Is the RegisteredSynchronization used by Hibernate for unified JTA Synchronization callbacks registered for this
coordinator?
|
void |
pulse()
Used by owner of the JdbcSession as a means to indicate that implicit joining should be done if needed.
|
void |
removeObserver(TransactionObserver observer)
Removed an observer from the coordinator.
|
void |
setTimeOut(int seconds) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isTransactionActive, isTransactionActive
public JtaTransactionCoordinatorImpl(TransactionCoordinatorBuilder transactionCoordinatorBuilder, TransactionCoordinatorOwner owner, boolean autoJoinTransactions, JtaPlatform jtaPlatform, boolean preferUserTransactions, boolean performJtaThreadTracking, TransactionObserver... observers)
public SynchronizationCallbackCoordinator getSynchronizationCallbackCoordinator()
public void pulse()
TransactionCoordinator
pulse
in interface TransactionCoordinator
public void explicitJoin()
TransactionCoordinator
EntityManager.joinTransaction()
, and generally speaking only has an impact in
JTA environmentsexplicitJoin
in interface TransactionCoordinator
public boolean isJoined()
TransactionCoordinator
isJoined
in interface TransactionCoordinator
true
if there is an active transaction this coordinator is already joined to; false
otherwise.public boolean isSynchronizationRegistered()
true
indicates that a RegisteredSynchronization is currently registered for this coordinator;
false
indicates it is not (yet) registered.public TransactionCoordinatorOwner getTransactionCoordinatorOwner()
public JpaCompliance getJpaCompliance()
getJpaCompliance
in interface TransactionCoordinator
public TransactionCoordinator.TransactionDriver getTransactionDriverControl()
TransactionCoordinator
getTransactionDriverControl
in interface TransactionCoordinator
public SynchronizationRegistry getLocalSynchronizations()
TransactionCoordinator
getLocalSynchronizations
in interface TransactionCoordinator
public boolean isActive()
TransactionCoordinator
Connection
, only when
it is initiated from here.isActive
in interface SynchronizationCallbackTarget
isActive
in interface TransactionCoordinator
true
if the transaction is still active; false
otherwise.public boolean isJtaTransactionCurrentlyActive()
public IsolationDelegate createIsolationDelegate()
TransactionCoordinator
createIsolationDelegate
in interface TransactionCoordinator
public TransactionCoordinatorBuilder getTransactionCoordinatorBuilder()
TransactionCoordinator
getTransactionCoordinatorBuilder
in interface TransactionCoordinator
public void setTimeOut(int seconds)
setTimeOut
in interface TransactionCoordinator
public int getTimeOut()
getTimeOut
in interface TransactionCoordinator
public void invalidate()
invalidate
in interface TransactionCoordinator
public void beforeCompletion()
SynchronizationCallbackTarget
beforeCompletion
in interface SynchronizationCallbackTarget
Synchronization.beforeCompletion()
public void afterCompletion(boolean successful, boolean delayed)
SynchronizationCallbackTarget
afterCompletion
in interface SynchronizationCallbackTarget
successful
- Was the transaction successful?Synchronization.afterCompletion(int)
public void addObserver(TransactionObserver observer)
TransactionCoordinator
addObserver
in interface TransactionCoordinator
observer
- The observer to add.public void removeObserver(TransactionObserver observer)
TransactionCoordinator
removeObserver
in interface TransactionCoordinator
observer
- The observer to remove.Copyright © 2020 JBoss by Red Hat. All rights reserved.