test(factory);
}
private static void test(StateManagerFactory factory) throws Exception
{
DataSourceDatabase db1 = new DataSourceDatabase();
db1.setId("db1");
db1.setLocation(JDBCDataSource.class.getName());
db1.setProperty("url", "jdbc:hsqldb:mem:db1");
db1.setProperty("user", "sa");
db1.setProperty("password", "");
db1.setUser("sa");
db1.setPassword("");
DataSourceDatabase db2 = new DataSourceDatabase();
db2.setId("db2");
db2.setLocation(JDBCDataSource.class.getName());
db2.setProperty("url", "jdbc:hsqldb:mem:db2");
db2.setProperty("user", "sa");
db2.setProperty("password", "");
db2.setUser("sa");
db2.setPassword("");
DataSourceDatabaseClusterConfiguration config = new DataSourceDatabaseClusterConfiguration();
config.setDatabases(Arrays.asList(db1, db2));
config.setDialectFactory(new HSQLDBDialectFactory());