KiWiConfiguration c = createKiWiConfig(database, dialect);
if (c!=null) configs.add(c);
}
public static KiWiConfiguration createKiWiConfig(String database, KiWiDialect dialect) {
final KiWiConfiguration config;
if(!(dialect instanceof H2Dialect) && System.getProperty(database.toLowerCase()+".url") != null) {
config = new KiWiConfiguration(
database,
System.getProperty(database.toLowerCase()+".url"),
System.getProperty(database.toLowerCase()+".user","kiwi"),
System.getProperty(database.toLowerCase()+".pass","kiwi"),
dialect);
} else if (dialect instanceof H2Dialect) {
config = new KiWiConfiguration(
"default-H2",
"jdbc:h2:mem:kiwitest;MVCC=true;DB_CLOSE_ON_EXIT=TRUE;DB_CLOSE_DELAY=-1",
"kiwi", "kiwi",
dialect);
} else {
return null;
}
config.setDefaultContext("http://localhost/context/default");
config.setInferredContext("http://localhost/context/inferred");
return config;
}