public static void create(
SharedActivationGroupDescriptor sharedGroupDesc)
throws Exception {
try {
ActivationGroupID gid = (ActivationGroupID)
sharedGroupDesc.create(EmptyConfiguration.INSTANCE);
File flog = new File(sharedGroupDesc.getLog());
System.out.println("Log: " + flog);
if (!flog.exists() || !flog.isDirectory()) {
throw new TestException(
"Failed -- Log dir wasn't created.");
}
File cookie = new File(flog, "cookie");
if (!cookie.exists() || !cookie.isFile() || cookie.length() <= 0) {
throw new TestException(
"Failed -- Group cookie wasn't created.");
}
ActivationGroupID recovered =
restoreGroupID(sharedGroupDesc.getLog());
if (!gid.equals(recovered)) {
throw new TestException(
"Failed -- Group ID improperly stored.");
}