if (!lockFile.createNewFile()) {
return false;
}
} catch (final IOException e) {
throw new ReadOnlyException(message("Could not create lock file", e));
}
try {
save();
} catch (final IOException e) {
throw new ReadOnlyException(message("Caught exception while trying to write lock file", e));
}
//Schedule the heart-beat for the file lock
final Properties params = new Properties();
params.put(FileLock.class.getName(), this);