ARTEMIS-2567 redundant lock on server.lock file
This commit is contained in:
parent
4005a63d9e
commit
59e7db8925
|
@ -108,14 +108,7 @@ public class FileLockNodeManager extends NodeManager {
|
|||
protected synchronized void setUpServerLockFile() throws IOException {
|
||||
super.setUpServerLockFile();
|
||||
|
||||
if (lockChannels[0] == null || !lockChannels[0].isOpen()) {
|
||||
File fileLock = newFile(NodeManager.SERVER_LOCK_NAME);
|
||||
if (!fileLock.exists()) {
|
||||
fileLock.createNewFile();
|
||||
}
|
||||
RandomAccessFile randomFileLock = new RandomAccessFile(fileLock, "rw");
|
||||
lockChannels[0] = randomFileLock.getChannel();
|
||||
}
|
||||
lockChannels[0] = channel;
|
||||
|
||||
for (int i = 1; i < 3; i++) {
|
||||
if (lockChannels[i] != null && lockChannels[i].isOpen()) {
|
||||
|
|
Loading…
Reference in New Issue