@Override public boolean isClosed() { return delegate.isClosed(); }
private void cleanupSession() { if ( session != null && ! ( (SessionImplementor) session ).isClosed() ) { session.close(); } session = null; }
private void cleanupSession() { if ( session != null && ! ( (SessionImplementor) session ).isClosed() ) { session.close(); } session = null; }
@Override public boolean shouldDoManagedFlush(SessionImplementor session) { return !session.isClosed() && session.getHibernateFlushMode() == FlushMode.MANUAL; } }
@Override public boolean shouldDoManagedFlush(SessionImplementor session) { if ( session.isClosed() ) { return false; } return session.getHibernateFlushMode() != FlushMode.MANUAL; } }
@Override public void doAction(boolean successful, SessionImplementor session) { if ( session.isClosed() ) { log.trace( "Session was closed; nothing to do" ); return; } if ( !successful && session.getTransactionCoordinator().getTransactionCoordinatorBuilder().isJta() ) { session.clear(); } } }
@After public void tearDown() throws Exception { if ( sessionImpl != null && !sessionImpl.isClosed() ) { ((Session) sessionImpl).close(); } if ( sessionFactory != null ) { sessionFactory.close(); } if ( serviceRegistry != null ) { StandardServiceRegistryBuilder.destroy( serviceRegistry ); } }
private void completeStrayTransaction() { if ( session == null ) { // nothing to do return; } if ( ( (SessionImplementor) session ).isClosed() ) { // nothing to do return; } if ( !session.isConnected() ) { // nothing to do return; } final TransactionCoordinator.TransactionDriver tdc = ( (SessionImplementor) session ).getTransactionCoordinator().getTransactionDriverControl(); if ( tdc.getStatus().canRollback() ) { session.getTransaction().rollback(); } session.close(); }
if ( FlushMode.MANUAL.equals( session.getHibernateFlushMode() ) || session.isClosed() ) { Session temporarySession = null; try {
private void completeStrayTransaction() { if ( session == null ) { // nothing to do return; } if ( ( (SessionImplementor) session ).isClosed() ) { // nothing to do return; } if ( !session.isConnected() ) { // nothing to do return; } final TransactionCoordinator.TransactionDriver tdc = ( (SessionImplementor) session ).getTransactionCoordinator().getTransactionDriverControl(); if ( tdc.getStatus().canRollback() ) { session.getTransaction().rollback(); } }
if ( !( (SessionImplementor) session ).isClosed() ) { session.close();
assertTrue( ( (SessionImplementor) s ).isClosed() ); try { ( ( HibernateProxy ) dp ).getHibernateLazyInitializer().setSession( ( SessionImplementor ) s );
@Override public final boolean isReadOnlySettingAvailable() { return ( session != null && ! session.isClosed() ); }
public boolean isClosed() { return ((SessionImplementor) delegate).isClosed(); }
@Override public final boolean isReadOnlySettingAvailable() { return ( session != null && ! session.isClosed() ); }
@Override public boolean shouldDoManagedFlush(SessionImplementor session) { if ( session.isClosed() ) { return false; } return session.getHibernateFlushMode() != FlushMode.MANUAL; } }
private static void errorIfClosed(final SessionImplementor sessionImplementor) { if (sessionImplementor.isClosed()) { throw new org.hibernate.SessionException("Session is closed!"); } }
private void errorIfReadOnlySettingNotAvailable() { if ( session == null ) { throw new TransientObjectException( "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); } if ( session.isClosed() ) { throw new SessionException( "Session is closed. The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); } }
private void errorIfReadOnlySettingNotAvailable() { if ( session == null ) { throw new TransientObjectException( "Proxy is detached (i.e, session is null). The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); } if ( session.isClosed() ) { throw new SessionException( "Session is closed. The read-only/modifiable setting is only accessible when the proxy is associated with an open session." ); } }
@Override public void doAction(boolean successful, SessionImplementor session) { if ( session.isClosed() ) { log.trace( "Session was closed; nothing to do" ); return; } if ( !successful && session.getTransactionCoordinator().getTransactionCoordinatorBuilder().isJta() ) { session.clear(); } } }