activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r652300 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
Date Wed, 30 Apr 2008 06:36:53 GMT
Author: rajdavies
Date: Tue Apr 29 23:36:53 2008
New Revision: 652300

URL: http://svn.apache.org/viewvc?rev=652300&view=rev
Log:
Fix for https://issues.apache.org/activemq/browse/AMQ-1701

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

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java?rev=652300&r1=652299&r2=652300&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/async/DataFile.java
Tue Apr 29 23:36:53 2008
@@ -85,7 +85,7 @@
         return result;
     }
 
-    public RandomAccessFile openRandomAccessFile(boolean appender) throws IOException {
+    public synchronized RandomAccessFile openRandomAccessFile(boolean appender) throws IOException
{
         RandomAccessFile rc = new RandomAccessFile(file, "rw");
         // When we start to write files size them up so that the OS has a chance
         // to allocate the file contigously.
@@ -97,7 +97,7 @@
         return rc;
     }
 
-    public void closeRandomAccessFile(RandomAccessFile file) throws IOException {
+    public synchronized void closeRandomAccessFile(RandomAccessFile file) throws IOException
{
         // On close set the file size to the real size.
         if (length != file.length()) {
             file.setLength(getLength());



Mime
View raw message