Example #1
0
 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;
 }
Example #2
0
 /** Set the properties for this DB. */
 public void setProperties(Properties p) {
   _db.setProperties(p);
 }