File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
hibernate-core/src/main/java/org/hibernate/internal Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -448,25 +448,30 @@ private boolean isJpaBootstrap() {
448448 private boolean isTransactionInProgressAndNotMarkedForRollback () {
449449 if ( waitingForAutoClose ) {
450450 return getSessionFactory ().isOpen ()
451- && getTransactionCoordinator (). isTransactionActive ( false );
451+ && isTransactionActive ();
452452 }
453453 else {
454454 return !isClosed ()
455- && getTransactionCoordinator (). isTransactionActive ( false );
455+ && isTransactionActive ();
456456 }
457457 }
458458
459+ private boolean isTransactionActive () {
460+ return getTransactionCoordinator ().isTransactionActive ( false );
461+ }
462+
459463 @ Override
460464 protected boolean shouldCloseJdbcCoordinatorOnClose (boolean isTransactionCoordinatorShared ) {
461- if ( !isTransactionCoordinatorShared ) {
462- return super .shouldCloseJdbcCoordinatorOnClose ( isTransactionCoordinatorShared );
465+ if ( isTransactionCoordinatorShared ) {
466+ final ActionQueue actionQueue = getActionQueue ();
467+ if ( actionQueue .hasBeforeTransactionActions () || actionQueue .hasAfterTransactionActions () ) {
468+ log .warn ( "On close, shared Session had before/after transaction actions that have not yet been processed" );
469+ }
470+ return false ;
463471 }
464-
465- final ActionQueue actionQueue = getActionQueue ();
466- if ( actionQueue .hasBeforeTransactionActions () || actionQueue .hasAfterTransactionActions () ) {
467- log .warn ( "On close, shared Session had before/after transaction actions that have not yet been processed" );
472+ else {
473+ return true ;
468474 }
469- return false ;
470475 }
471476
472477 @ Override
You can’t perform that action at this time.
0 commit comments