Пример #1
0
 public boolean open(Process p, Any toOpen, IntI mode) throws AnyException {
   // try
   // {
   // Acquire an SQL connection
   AnySql sql = (AnySql) SqlManager.instance().acquire(sqlLogin_);
   if (sql == null) throw new AnyException("Cannot acquire an SQL connection resource"); // ,
   // sqlLogin_);
   // }
   return true;
 }
Пример #2
0
  /**
   * Close the IO connection. This implementation releases any sql resources that may still be held.
   */
  public void close() {
    if (anySql_ != null) {
      try {
        // Gah!
        e_.setThrowable(null);
        SqlManager.instance().release(sqlLogin_, anySql_, null, e_);
      } catch (Exception e) {
        throw new RuntimeContainedException(e);
      }

      if (e_.getThrowable() != null) throw new RuntimeContainedException(e_.getThrowable());
    }
  }