HHH-8942 Micro polishing in hot method of TransactionCoordinatorImpl
Conflicts: hibernate-core/src/main/java/org/hibernate/engine/transaction/internal/TransactionCoordinatorImpl.java
This commit is contained in:
parent
c8116f5184
commit
9b92856502
|
@ -60,7 +60,7 @@ import org.hibernate.internal.util.collections.CollectionHelper;
|
||||||
*
|
*
|
||||||
* @author Steve Ebersole
|
* @author Steve Ebersole
|
||||||
*/
|
*/
|
||||||
public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
public final class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||||
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( TransactionCoordinatorImpl.class );
|
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( TransactionCoordinatorImpl.class );
|
||||||
private static final boolean DEBUGGING = LOG.isDebugEnabled();
|
private static final boolean DEBUGGING = LOG.isDebugEnabled();
|
||||||
private static final boolean TRACING = LOG.isTraceEnabled();
|
private static final boolean TRACING = LOG.isTraceEnabled();
|
||||||
|
@ -225,12 +225,13 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( currentHibernateTransaction.getJoinStatus() != JoinStatus.JOINED ) {
|
final JoinStatus joinStatus = currentHibernateTransaction.getJoinStatus();
|
||||||
|
if ( joinStatus != JoinStatus.JOINED ) {
|
||||||
// the transaction is not (yet) joined, see if we should join...
|
// the transaction is not (yet) joined, see if we should join...
|
||||||
if ( !transactionContext.shouldAutoJoinTransaction() ) {
|
if ( !transactionContext.shouldAutoJoinTransaction() ) {
|
||||||
// we are supposed to not auto join transactions; if the transaction is not marked for join
|
// we are supposed to not auto join transactions; if the transaction is not marked for join
|
||||||
// we cannot go any further in attempting to join (register sync).
|
// we cannot go any further in attempting to join (register sync).
|
||||||
if ( currentHibernateTransaction.getJoinStatus() != JoinStatus.MARKED_FOR_JOINED ) {
|
if ( joinStatus != JoinStatus.MARKED_FOR_JOINED ) {
|
||||||
if (DEBUGGING) LOG.debug( "Skipping JTA sync registration due to auto join checking" );
|
if (DEBUGGING) LOG.debug( "Skipping JTA sync registration due to auto join checking" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -238,13 +239,13 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||||
}
|
}
|
||||||
|
|
||||||
// IMPL NOTE : At this point the local callback is the "maybe" one. The only time that needs to change is if
|
// IMPL NOTE : At this point the local callback is the "maybe" one. The only time that needs to change is if
|
||||||
// we are able to successfully register the transaction synchronization in which case the local callback would become
|
// we are able to successfully register the transaction synchronization in which case the local callback would become
|
||||||
// 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
|
||||||
|
|
||||||
// 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 register synchronization; skipping" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue