QName foobar = new QName("foo","bar");
ConfStoreConnection conn = cf.getConnection();
conn.begin();
try {
DeploymentUnitDAO du = conn.createDeploymentUnit("foo1");
ProcessConfDAO p = du.createProcess(foobar,foobar,1);
assertEquals(foobar,p.getPID());
assertEquals(foobar,p.getType());
assertNotNull(p.getDeploymentUnit());
assertEquals("foo1", p.getDeploymentUnit().getName());
} finally {
conn.commit();
conn.close();
}
conn = cf.getConnection();
conn.begin();
try {
DeploymentUnitDAO du = conn.getDeploymentUnit("foo1");
ProcessConfDAO p = du.getProcess(foobar);
assertNotNull(p);
assertNotNull(du.getProcesses());
assertEquals(foobar,p.getPID());
assertEquals(foobar,p.getType());
} finally {
conn.commit();
conn.close();
}