lock = null;
try {
- if (!lockfile.exists())
- if (!lockfile.createNewFile()) {
+ /*if (!lockfile.createNewFile()) {
log.warn("Failed to create locked file "+lockfile);
return;
}
-
+ */
rafile=new RandomAccessFile(lockfile,"rw");
if (block)
lock = rafile.getChannel().lock();
} catch (IOException e) {
log.error("Error! Problems with IO when creating a lock on "
+ lockfile.getAbsolutePath(),e);
- }
+ } // catch (Exception )
}
public boolean isLocked() {