Package org.olat.core.commons.persistence

Examples of org.olat.core.commons.persistence.DB.closeSession()


   * TearDown is called after each test
   */
  public void tearDown() {
    try {
      DB db = DBFactory.getInstance();
      db.closeSession();
    } catch (Exception e) {
      log.error("Exception in tearDown(): " + e);
    }
  }

View Full Code Here


      // without this optimization, the first entries will be fast but then the adding new
      // entries will slow down due to the fact that hibernate needs to adjust the size of
      // the session cache permanently. flushing or transactions won't help since the problem
      // is in the session cache.
      if (i%2 == 0) {
        db.closeSession();
        db = DBFactory.getInstance();
      }
    }
    long endCreate = System.currentTimeMillis();
    Tracing.logDebug("created " + numbRes + " repo entries in " + (endCreate - startCreate) + "ms", RepositoryManagerTest.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.