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.
|
SynchronizationRegistry |
getLocalSynchronizations()
Get access to the local registry of Synchronization instances
|
SynchronizationCallbackCoordinator |
getSynchronizationCallbackCoordinator() |
int |
getTimeOut() |
TransactionCoordinatorBuilder |
getTransactionCoordinatorBuilder() |
TransactionCoordinatorOwner |
getTransactionCoordinatorOwner() |
TransactionCoordinator.TransactionDriver |
getTransactionDriverControl()
Get the delegate used by the local transaction driver to control the underlying transaction
|
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 |
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) |
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 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 IsolationDelegate createIsolationDelegate()
TransactionCoordinator
createIsolationDelegate
in interface TransactionCoordinator
public TransactionCoordinatorBuilder getTransactionCoordinatorBuilder()
getTransactionCoordinatorBuilder
in interface TransactionCoordinator
public void setTimeOut(int seconds)
setTimeOut
in interface TransactionCoordinator
public int getTimeOut()
getTimeOut
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 © 2016 JBoss by Red Hat. All rights reserved.