Package org.hibernate

Examples of org.hibernate.SessionException


  //Copied from org.hibernate.internal.AbstractSessionImpl.errorIfClosed()
  //to mimic same behaviour
  protected void errorIfClosed() {
    if ( delegate.isClosed() ) {
      throw new SessionException( "Session is closed!" );
    }
  }
View Full Code Here


  //Copied from org.hibernate.internal.AbstractSessionImpl.errorIfClosed()
  //to mimic same behaviour
  protected void errorIfClosed() {
    if ( delegate.isClosed() ) {
      throw new SessionException( "Session is closed!" );
    }
  }
View Full Code Here

    return connectionManager.borrowConnection();
  }
 
  public Connection connection() throws HibernateException {
    if ( owner.isClosed() ) {
      throw new SessionException( "Session is closed" );
    }

    return connectionManager.getConnection();
  }
View Full Code Here

    UnresolvableObjectException.throwIfNull( result, id, persister.getEntityName() );
  }

  public Object immediateLoad(String entityName, Serializable id)
      throws HibernateException {
    throw new SessionException("proxies cannot be fetched by a stateless session");
  }
View Full Code Here

  }

  public void initializeCollection(
      PersistentCollection collection,
          boolean writing) throws HibernateException {
    throw new SessionException("collections cannot be fetched by a stateless session");
  }
View Full Code Here

    return false;
  }

  public void managedClose() {
    if ( isClosed() ) {
      throw new SessionException( "Session was already closed!" );
    }
    jdbcContext.getConnectionManager().close();
    setClosed();
  }
View Full Code Here

  }

  public Connection close() throws HibernateException {
    log.trace( "closing session" );
    if ( isClosed() ) {
      throw new SessionException( "Session was already closed" );
    }
   

    if ( factory.getStatistics().isStatisticsEnabled() ) {
      factory.getStatisticsImplementor().closeSession();
View Full Code Here

    closed = true;
  }

  protected void errorIfClosed() {
    if ( closed ) {
      throw new SessionException( "Session is closed!" );
    }
  }
View Full Code Here

    return connectionManager.borrowConnection();
  }
 
  public Connection connection() throws HibernateException {
    if ( owner.isClosed() ) {
      throw new SessionException( "Session is closed" );
    }

    return connectionManager.getConnection();
  }
View Full Code Here

  }

  public Connection close() throws HibernateException {
    log.trace( "closing session" );
    if ( isClosed() ) {
      throw new SessionException( "Session was already closed" );
    }
   

    if ( factory.getStatistics().isStatisticsEnabled() ) {
      factory.getStatisticsImplementor().closeSession();
View Full Code Here

TOP

Related Classes of org.hibernate.SessionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.