activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r646886 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
Date Thu, 10 Apr 2008 17:28:01 GMT
Author: chirino
Date: Thu Apr 10 10:27:53 2008
New Revision: 646886

URL: http://svn.apache.org/viewvc?rev=646886&view=rev
Log:
Make sure we close the lock file even if we failed to lock it.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java?rev=646886&r1=646885&r2=646886&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
Thu Apr 10 10:27:53 2008
@@ -111,9 +111,6 @@
             closed = true;
             if (initialized) {
                 unlock();
-                if (lockFile!=null) {
-                    lockFile.close();
-                }
                 for (ListContainerImpl container : lists.values()) {
                     container.close();
                 }
@@ -132,6 +129,10 @@
                     dm.close();
                     iter.remove();
                 }
+            }
+            if (lockFile!=null) {
+                lockFile.close();
+                lockFile=null;
             }
         }
     }



Mime
View raw message