public static DBInterface getDirDB(String dbfile) { synchronized (db_monitor) { if (db_dir == null) { try { db_dir = new DBInterface(dbfile); ArrayList<ArrayList<Object>> a = db_dir._select( "SELECT * FROM " + table.registered.TNAME + " LIMIT 1", new String[] {}, DEBUG); if (DEBUG) { System.out.println("DirectoryServer:getDBDir got " + a.size()); for (ArrayList<Object> t : a) { System.out.println("DirectoryServer:getDBDir table " + t.size()); } } } catch (P2PDDSQLException e) { System.out.println("Failure to open directory database: " + dbfile); e.printStackTrace(); } } } return db_dir; }