private void deleteAll() throws IOException {
FileUtils.deleteDirectory(new File("./target/dbClusterTest"));
}
public void test() throws RepositoryException {
RepositoryImpl rep1 = RepositoryImpl.create(RepositoryConfig.create(
new File("./target/dbClusterTest/node1")));
RepositoryImpl rep2 = RepositoryImpl.create(RepositoryConfig.create(
new File("./target/dbClusterTest/node2")));
Session s1 = rep1.login(new SimpleCredentials("admin", "admin".toCharArray()));
Session s2 = rep2.login(new SimpleCredentials("admin", "admin".toCharArray()));
s1.getRootNode().addNode("test1");
s2.getRootNode().addNode("test2");
s1.save();
s2.save();
s1.refresh(true);
s2.refresh(true);
s1.getRootNode().getNode("test2");
s2.getRootNode().getNode("test1");
rep1.shutdown();
rep2.shutdown();
}