Make sure we close the lock file even if we failed to lock it.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@646886 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-04-10 17:27:53 +00:00
parent dfcf776e5d
commit be0446fd2a
1 changed files with 4 additions and 3 deletions

View File

@ -111,9 +111,6 @@ public class KahaStore implements Store {
closed = true; closed = true;
if (initialized) { if (initialized) {
unlock(); unlock();
if (lockFile!=null) {
lockFile.close();
}
for (ListContainerImpl container : lists.values()) { for (ListContainerImpl container : lists.values()) {
container.close(); container.close();
} }
@ -133,6 +130,10 @@ public class KahaStore implements Store {
iter.remove(); iter.remove();
} }
} }
if (lockFile!=null) {
lockFile.close();
lockFile=null;
}
} }
} }