HHH-8942 reorganized TransactionCoordinatorImpl#attemptToRegisterJtaSync
to further reduce log level checks
This commit is contained in:
parent
dc0c207256
commit
2d964f1b5f
|
@ -214,6 +214,12 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
|||
return;
|
||||
}
|
||||
|
||||
JtaPlatform jtaPlatform = getTransactionEnvironment().getJtaPlatform();
|
||||
if ( jtaPlatform == null ) {
|
||||
// if no jta platform was registered we wont be able to register a jta synchronization
|
||||
return;
|
||||
}
|
||||
|
||||
// Has the local transaction (Hibernate facade) taken on the responsibility of driving the transaction inflow?
|
||||
if ( currentHibernateTransaction.isInitiator() ) {
|
||||
return;
|
||||
|
@ -236,12 +242,6 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
|||
// non driving. To that end, the following checks are simply opt outs where we are unable to register the
|
||||
// synchronization
|
||||
|
||||
JtaPlatform jtaPlatform = getTransactionEnvironment().getJtaPlatform();
|
||||
if ( jtaPlatform == null ) {
|
||||
// if no jta platform was registered we wont be able to register a jta synchronization
|
||||
return;
|
||||
}
|
||||
|
||||
// Can we resister a synchronization
|
||||
if ( !jtaPlatform.canRegisterSynchronization() ) {
|
||||
if (TRACING) LOG.trace( "registered JTA platform says we cannot currently resister synchronization; skipping" );
|
||||
|
|
Loading…
Reference in New Issue