Package tigase.db

Examples of tigase.db.DBInitException


    db_conn = connection_str;
    try {
      initRepo();
    } catch (SQLException e) {
      conn = null;
      throw  new DBInitException("Problem initializing jdbc connection: "
        + db_conn, e);
    }
  }
View Full Code Here


    try {
      initRepo();
      log.info("Initialized database connection: " + connection_str);
    } catch (SQLException e) {
      conn = null;
      throw  new DBInitException("Problem initializing jdbc connection: "
        + db_conn, e);
    }
  }
View Full Code Here

      if (params != null && params.get("init-db") != null) {
        init_db.executeQuery();
      }
    } catch (SQLException e) {
      conn = null;
      throw  new DBInitException("Problem initializing jdbc connection: "
        + db_conn, e);
    }
  }
View Full Code Here

    }
    try {
      initRepo();
    } catch (SQLException e) {
      conn = null;
      throw  new DBInitException("Problem initializing jdbc connection: "
        + db_conn, e);
    }
    try {
      if (online_status) {
        Statement stmt = conn.createStatement();
        stmt.executeUpdate("update users set online_status = 0;");
        stmt.close();
        stmt = null;
      }
    } catch (SQLException e) {
      if (e.getMessage().contains("'online_status'")) {
        try {
          Statement stmt = conn.createStatement();
          stmt.executeUpdate("alter table users add online_status int default 0;");
          stmt.close();
          stmt = null;
        } catch (SQLException ex) {
          conn = null;
          throw  new DBInitException("Problem initializing jdbc connection: "
            + db_conn, ex);
        }
      } else {
        conn = null;
        throw  new DBInitException("Problem initializing jdbc connection: "
          + db_conn, e);
      }
    }
  }
View Full Code Here

      if (params != null && params.get("init-db") != null) {
        init_db_sp.executeQuery();
      }
    } catch (SQLException e) {
      conn = null;
      throw  new DBInitException("Problem initializing jdbc connection: "
        + db_conn, e);
    }
  }
View Full Code Here

TOP

Related Classes of tigase.db.DBInitException

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.