org.jpos.ee.DB.close()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中org.jpos.ee.DB.close()方法的一些代码示例,展示了DB.close()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DB.close()方法的具体详情如下:
包路径:org.jpos.ee.DB
类名称:DB
方法名:close

DB.close介绍

[英]close hibernate session
[中]关闭休眠会话

代码示例

代码示例来源:origin: jpos/jPOS-EE

/**
 * Close underlying Hibernate session.
 * @throws HibernateException
 */
public synchronized void close () throws HibernateException {
  db.close();
}
/**

代码示例来源:origin: jpos/jPOS-EE

private void close() {
    if (db != null) {
      db.close();
      db = null;
    }
  }
}

代码示例来源:origin: jpos/jPOS-EE

private void close() {
  try {
    db.close();
  } catch (HibernateException e) {
    getLog().error (e);
  }
}
public void setConfiguration (Element config) {

代码示例来源:origin: jpos/jPOS-EE

private void close() {
  try {
    db.close();
  } catch (HibernateException e) {
    getLog().error (e);
  }
}
private String getDetail (long start, int tick) {

代码示例来源:origin: jpos/jPOS-EE

@After
public void tearDown() {
  db.close();
}

代码示例来源:origin: jpos/jPOS-EE

private void createSchema () throws HibernateException, DocumentException {
  DB db = new DB();
  db.open();
  db.beginTransaction();
  db.createSchema(null, true);
  db.commit();
  db.close();
}

代码示例来源:origin: jpos/jPOS-EE

private void closeDB (Serializable o) {
    Context ctx = (Context) o;
    DB db = (DB) ctx.get (DB);
    if (db != null) {
      // ctx.checkPoint ("Closing");
      Transaction tx = (Transaction) ctx.get (TX);
      try {
        if (tx != null) {
          try {
            tx.commit ();
            ctx.remove (TX); 
            // ctx.checkPoint ("Close-Commit");
          } catch (RuntimeException t) {
            error (t);
            try {
              tx.rollback();
            } catch (RuntimeException rte) {
              error ("Rollback error", rte);
            }
          }
        }
        db.close ();
      } catch (RuntimeException ex) {
        error (ex);
      }
    }
    checkPoint(ctx);
  }
}

代码示例来源:origin: jpos/jPOS-EE

db.close ();
} catch (Throwable t) {
  errorLog (evt, t);

相关文章