activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r603927 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq: kaha/impl/KahaStore.java store/amq/AMQPersistenceAdapter.java
Date Thu, 13 Dec 2007 14:45:04 GMT
Author: rajdavies
Date: Thu Dec 13 06:45:01 2007
New Revision: 603927

URL: http://svn.apache.org/viewvc?rev=603927&view=rev
Log:
changed unlock() method to use remove() instead of clearProperty
as this doesn't work on some platforms

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/KahaStore.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.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=603927&r1=603926&r2=603927&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 Dec 13 06:45:01 2007
@@ -503,9 +503,11 @@
 
     private synchronized void unlock() throws IOException {
         if (!DISABLE_LOCKING && (null != directory) && (null != lock)) {
-            System.clearProperty(getPropertyKey());
+            //clear property doesn't work on some platforms
+            System.getProperties().remove(getPropertyKey());
             if (lock.isValid()) {
                 lock.release();
+                lock.channel().close();
             }
             lock = null;
         }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java?rev=603927&r1=603926&r2=603927&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/amq/AMQPersistenceAdapter.java
Thu Dec 13 06:45:01 2007
@@ -887,10 +887,12 @@
     }
 	
 	private synchronized void unlock() throws IOException {
-        if (!disableLocking && (null != directory) && (null != lock)) {
-            System.clearProperty(getPropertyKey());
+        if (!disableLocking && (null != lock)) {
+            //clear property doesn't work on some platforms
+            System.getProperties().remove(getPropertyKey());
             if (lock.isValid()) {
                 lock.release();
+                lock.channel().close();
             }
             lock = null;
         }



Mime
View raw message