activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject [1/2] git commit: Don't assume all persistence store use the same default directory.
Date Fri, 27 Sep 2013 13:20:00 GMT
Updated Branches:
  refs/heads/trunk 70c698f98 -> f75520fc8


Don't assume all persistence store use the same default directory.

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/28163a40
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/28163a40
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/28163a40

Branch: refs/heads/trunk
Commit: 28163a4065021165d1ba20824ff7fd32474e9fb3
Parents: 70c698f
Author: Hiram Chirino <hiram@hiramchirino.com>
Authored: Fri Sep 27 05:10:30 2013 -0400
Committer: Hiram Chirino <hiram@hiramchirino.com>
Committed: Fri Sep 27 05:10:30 2013 -0400

----------------------------------------------------------------------
 .../activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/28163a40/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
----------------------------------------------------------------------
diff --git a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
index 6cc252f..c8fe75b 100644
--- a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
+++ b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/MultiKahaDBPersistenceAdapter.java
@@ -371,12 +371,18 @@ public class MultiKahaDBPersistenceAdapter extends LockableServiceSupport
implem
 
     private void configureDirectory(PersistenceAdapter adapter, String fileName) {
         File directory = null;
-        if (MessageDatabase.DEFAULT_DIRECTORY.equals(adapter.getDirectory())) {
+        File defaultDir = MessageDatabase.DEFAULT_DIRECTORY;
+        try {
+            defaultDir = adapter.getClass().newInstance().getDirectory();
+        } catch (Exception e) {
+        }
+        if (defaultDir.equals(adapter.getDirectory())) {
             // not set so inherit from mkahadb
             directory = getDirectory();
         } else {
             directory = adapter.getDirectory();
         }
+
         if (fileName != null) {
             directory = new File(directory, fileName);
         }


Mime
View raw message