public DatabaseAdapter create() {
try {
Configuration configuration = Configuration.getConfiguration();
String adapter = configuration.get("database_adapter");
if (adapter == null) {
return new MySQLDatabaseAdapter(connInfo);
}
Class<DatabaseAdapter> clazz= (Class<DatabaseAdapter>) Class.forName(adapter);
Constructor<DatabaseAdapter> ctor = clazz.getConstructor(Properties.class);
return ctor.newInstance(connInfo);
} catch (Exception e) {