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
|
||||
*/
|
||||
public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||
public final class TransactionCoordinatorImpl implements TransactionCoordinator {
|
||||
private static final CoreMessageLogger LOG = CoreLogging.messageLogger( TransactionCoordinatorImpl.class );
|
||||
private static final boolean DEBUGGING = LOG.isDebugEnabled();
|
||||
private static final boolean TRACING = LOG.isTraceEnabled();
|
||||
|
@ -225,12 +225,13 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
|||
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...
|
||||
if ( !transactionContext.shouldAutoJoinTransaction() ) {
|
||||
// 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).
|
||||
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" );
|
||||
return;
|
||||
}
|
||||
|
@ -244,7 +245,7 @@ public class TransactionCoordinatorImpl implements TransactionCoordinator {
|
|||
|
||||
// Can we resister a synchronization
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue