activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r573392 - in /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index: IndexManager.java hash/HashIndex.java tree/TreeIndex.java
Date Thu, 06 Sep 2007 22:05:43 GMT
Author: chirino
Date: Thu Sep  6 15:05:43 2007
New Revision: 573392

URL: http://svn.apache.org/viewvc?rev=573392&view=rev
Log:
if the container name has '/' in it then make sure we create the parent directories before
we try to access the file.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java?rev=573392&r1=573391&r2=573392&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/IndexManager.java
Thu Sep  6 15:05:43 2007
@@ -177,6 +177,7 @@
 
     protected void initialize() throws IOException {
         file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name) );
+        file.getParentFile().mkdirs();        
         indexFile = new RandomAccessFile(file, mode);
         reader = new StoreIndexReader(indexFile);
         writer = new StoreIndexWriter(indexFile, name, redoLog);

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java?rev=573392&r1=573391&r2=573392&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/hash/HashIndex.java
Thu Sep  6 15:05:43 2007
@@ -392,6 +392,7 @@
     private void openIndexFile() throws IOException {
         if (indexFile == null) {
             file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name));
+            file.getParentFile().mkdirs();
             indexFile = new RandomAccessFile(file, "rw");
         }
     }

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java?rev=573392&r1=573391&r2=573392&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/kaha/impl/index/tree/TreeIndex.java
Thu Sep  6 15:05:43 2007
@@ -407,6 +407,7 @@
     protected void openIndexFile() throws IOException {
         if (indexFile == null) {
             file = new File(directory, NAME_PREFIX + IOHelper.toFileSystemSafeName(name));
+            file.getParentFile().mkdirs();
             indexFile = new RandomAccessFile(file, "rw");
         }
     }



Mime
View raw message