Ejemplo n.º 1
0
 /*
  * This method only works with HSQLDB database. If one doesn't close the
  * HSQLDB properly with high probability, the DB goes into instable or in
  * worst case becomes corrupted.
  */
 @Override
 public void shutdown() throws SQLException {
   getConnection().createStatement().execute("SHUTDOWN");
   //        logger.warn("Closing the database server (for HSqlDB) [done].");
   //        logger.warn("Closing the connection pool [done].");
   super.shutdown();
 }
Ejemplo n.º 2
0
 @Override
 public void initDatabaseAccess(Connection con) throws Exception {
   Statement stmt = con.createStatement();
   stmt.execute("SET REFERENTIAL_INTEGRITY FALSE");
   stmt.execute(
       "CREATE ALIAS IF NOT EXISTS NOW_MILLIS FOR \"java.lang.System.currentTimeMillis\";");
   super.initDatabaseAccess(con);
 }