@Override public boolean shouldAutoClose() { return isAutoCloseSessionEnabled() && !isClosed(); }
private void managedClose() { if ( isClosed() ) { throw new SessionException( "Session was already closed!" ); } close(); }
@Override public void afterTransactionCompletion(boolean successful, boolean delayed) { if ( shouldAutoClose() && !isClosed() ) { managedClose(); } }
@Override public void flushBeforeTransactionCompletion() { boolean flush = false; try { flush = ( !isClosed() && !isFlushModeNever() && !JtaStatusHelper.isRollback( getJtaPlatform().getCurrentStatus() ) ); } catch (SystemException se) { throw new HibernateException( "could not determine transaction status in beforeCompletion()", se ); } if ( flush ) { managedFlush(); } }
@Override public boolean isOpen() { return !isClosed(); }
@Override public boolean isOpen() { return !isClosed(); }
@Override public boolean shouldAutoClose() { return isAutoCloseSessionEnabled() && !isClosed(); }
@Override public boolean shouldAutoClose() { return isAutoCloseSessionEnabled() && !isClosed(); }
@Override public boolean shouldAutoClose() { return isAutoCloseSessionEnabled() && !isClosed(); }
private void managedClose() { if ( isClosed() ) { throw new SessionException( "Session was already closed!" ); } close(); }
@Override public void afterTransactionCompletion(boolean successful, boolean delayed) { if ( shouldAutoClose() && !isClosed() ) { managedClose(); } }
@Override public void managedClose() { if ( isClosed() ) { throw new SessionException( "Session was already closed!" ); } transactionCoordinator.close(); setClosed(); }
@Override public void managedClose() { if ( isClosed() ) { throw new SessionException( "Session was already closed!" ); } transactionCoordinator.close(); setClosed(); }
@Override public void flushBeforeTransactionCompletion() { boolean flush = false; try { flush = ( !isClosed() && !isFlushModeNever() && !JtaStatusHelper.isRollback( getJtaPlatform().getCurrentStatus() ) ); } catch (SystemException se) { throw new HibernateException( "could not determine transaction status in beforeCompletion()", se ); } if ( flush ) { managedFlush(); } }