HHH-8942 reorganized TransactionCoordinatorImpl#attemptToRegisterJtaSync
to further reduce log level checks
This commit is contained in:
parent
f7c7842cc4
commit
aad23dc804
|
@ -216,6 +216,12 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||||
return;
|
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?
|
// Has the local transaction (Hibernate facade) taken on the responsibility of driving the transaction inflow?
|
||||||
if ( currentHibernateTransaction.isInitiator() ) {
|
if ( currentHibernateTransaction.isInitiator() ) {
|
||||||
return;
|
return;
|
||||||
|
@ -233,12 +239,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
|
// non driving. To that end, the following checks are simply opt outs where we are unable to register the
|
||||||
// synchronization
|
// 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
|
// Can we resister a synchronization
|
||||||
if ( !jtaPlatform.canRegisterSynchronization() ) {
|
if ( !jtaPlatform.canRegisterSynchronization() ) {
|
||||||
if (TRACING) LOG.trace( "registered JTA platform says we cannot currently resister synchronization; skipping" );
|
if (TRACING) LOG.trace( "registered JTA platform says we cannot currently resister synchronization; skipping" );
|
||||||
|
|
Loading…
Reference in New Issue