/** * Checks whether the session is open or is waiting for auto-close * * @return {@code true} if the session is closed or if it's waiting for auto-close; {@code false} otherwise. */ default boolean isOpenOrWaitingForAutoClose() { return !isClosed(); }
@Override public final boolean isReadOnlySettingAvailable() { return (session != null && !session.isClosed()); }
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor sessionImplementor) { if ( !sessionImplementor.isClosed() ) { try { ( (Session) sessionImplementor ).evict( data ); } catch ( HibernateException ignore ) { } } } }
/** * Checks whether the session is open or is waiting for auto-close * * @return {@code true} if the session is closed or if it's waiting for auto-close; {@code false} otherwise. */ default boolean isOpenOrWaitingForAutoClose() { return !isClosed(); }
@Override public final boolean isReadOnlySettingAvailable() { return (session != null && !session.isClosed()); }
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor sessionImplementor) { if ( !sessionImplementor.isClosed() ) { try { ( (Session) sessionImplementor ).evict( data ); } catch ( HibernateException ignore ) { } } } }
private void errorIfReadOnlySettingNotAvailable() { if ( session == null ) { throw new TransientObjectException( "Proxy [" + entityName + "#" + id + "] 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 [" + entityName + "#" + id + "] is associated with an open session." ); } }