public static DB newDB(String name, Properties properties) throws UnknownDBException { ClassLoader classLoader = DBFactory.class.getClassLoader(); DB db; try { Class dbClass = classLoader.loadClass(name); db = (DB) dbClass.newInstance(); } catch (Exception e) { e.printStackTrace(); return null; } db.setProperties(properties); return db; }
/** Set the properties for this DB. */ public void setProperties(Properties p) { _db.setProperties(p); }