Tabnine Logo
SessionImplementor.isClosed
Code IndexAdd Tabnine to your IDE (free)

How to use
isClosed
method
in
org.hibernate.engine.spi.SessionImplementor

Best Java code snippets using org.hibernate.engine.spi.SessionImplementor.isClosed (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

@Override
public boolean isClosed() {
  return delegate.isClosed();
}
origin: hibernate/hibernate-orm

private void cleanupSession() {
  if ( session != null && ! ( (SessionImplementor) session ).isClosed() ) {
    session.close();
  }
  session = null;
}
origin: hibernate/hibernate-orm

private void cleanupSession() {
  if ( session != null && ! ( (SessionImplementor) session ).isClosed() ) {
    session.close();
  }
  session = null;
}
origin: hibernate/hibernate-orm

  @Override
  public boolean shouldDoManagedFlush(SessionImplementor session) {
    return !session.isClosed()
        && session.getHibernateFlushMode() == FlushMode.MANUAL;
  }
}
origin: hibernate/hibernate-orm

  @Override
  public boolean shouldDoManagedFlush(SessionImplementor session) {
    if ( session.isClosed() ) {
      return false;
    }
    return session.getHibernateFlushMode() != FlushMode.MANUAL;
  }
}
origin: hibernate/hibernate-orm

  @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();
    }
  }
}
origin: hibernate/hibernate-orm

@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 );
  }
}
origin: hibernate/hibernate-orm

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();
}
origin: hibernate/hibernate-orm

if ( FlushMode.MANUAL.equals( session.getHibernateFlushMode() ) || session.isClosed() ) {
  Session temporarySession = null;
  try {
origin: hibernate/hibernate-orm

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();
  }
}
origin: hibernate/hibernate-orm

if ( !( (SessionImplementor) session ).isClosed() ) {
  session.close();
origin: hibernate/hibernate-orm

assertTrue( ( (SessionImplementor) s ).isClosed() );
try {
  ( ( HibernateProxy ) dp ).getHibernateLazyInitializer().setSession( ( SessionImplementor ) s );            
origin: org.hibernate/com.springsource.org.hibernate

@Override
public final boolean isReadOnlySettingAvailable() {
  return ( session != null && ! session.isClosed() );
}
origin: org.jboss.seam/jboss-seam

public boolean isClosed()
{
 return ((SessionImplementor) delegate).isClosed();
}
origin: org.hibernate/com.springsource.org.hibernate.core

@Override
public final boolean isReadOnlySettingAvailable() {
  return ( session != null && ! session.isClosed() );
}
origin: org.hibernate.orm/hibernate-core

  @Override
  public boolean shouldDoManagedFlush(SessionImplementor session) {
    if ( session.isClosed() ) {
      return false;
    }
    return session.getHibernateFlushMode() != FlushMode.MANUAL;
  }
}
origin: com.atlassian.hibernate/hibernate.adapter

private static void errorIfClosed(final SessionImplementor sessionImplementor) {
  if (sessionImplementor.isClosed()) {
    throw new org.hibernate.SessionException("Session is closed!");
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

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." );
  }
}
origin: org.hibernate/com.springsource.org.hibernate

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." );
  }
}
origin: org.hibernate.orm/hibernate-core

  @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();
    }
  }
}
org.hibernate.engine.spiSessionImplementorisClosed

Javadoc

Determine whether the session is closed. Provided separately from #isOpen() as this method does not attempt any JTA synchronization registration, where as #isOpen() does; which makes this one nicer to use for most internal purposes.

Popular methods of SessionImplementor

  • getFactory
    Get the creating SessionFactoryImplementor
  • getTransactionCoordinator
  • connection
  • getPersistenceContext
    Get the persistence context for this session
  • getLoadQueryInfluencers
    Get the load query influencers associated with this session.
  • isTransactionInProgress
    Does this Session have an active Hibernate transaction or is there a JTA transaction in progress?
  • getEntityPersister
    Get the EntityPersister for any instance
  • getJdbcCoordinator
  • flush
  • getTenantIdentifier
    Match te method on org.hibernate.Session and org.hibernate.StatelessSession
  • generateEntityKey
  • getContextEntityIdentifier
  • generateEntityKey,
  • getContextEntityIdentifier,
  • isOpen,
  • bestGuessEntityName,
  • getFlushMode,
  • getSessionFactory,
  • guessEntityName,
  • immediateLoad,
  • initializeCollection

Popular in Java

  • Reactive rest calls using spring rest template
  • getSupportFragmentManager (FragmentActivity)
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Notification (javax.management)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now