activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [2/3] activemq-artemis git commit: ARTEMIS-139 data.folder related to artemis
Date Wed, 17 Jun 2015 20:17:51 GMT
ARTEMIS-139 data.folder related to artemis

https://issues.apache.org/jira/browse/ARTEMIS-139

I'm using the constructors on File(parent, filename) now with the home directory


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

Branch: refs/heads/master
Commit: 438892352777a6870a329b186e13d0547c2bf405
Parents: 7de88ef
Author: Clebert Suconic <clebertsuconic@apache.org>
Authored: Tue Jun 16 18:49:43 2015 -0400
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jun 17 14:10:54 2015 -0400

----------------------------------------------------------------------
 .../artemis/cli/commands/Configurable.java      |   2 +-
 .../activemq/artemis/cli/commands/Create.java   |   6 +-
 .../activemq/artemis/cli/commands/Run.java      |   9 +-
 .../cli/commands/tools/DataAbstract.java        |   8 +-
 .../cli/commands/tools/DecodeJournal.java       |   2 +-
 .../cli/commands/tools/EncodeJournal.java       |   3 +-
 .../artemis/cli/commands/tools/PrintData.java   |   8 +-
 .../cli/commands/tools/XmlDataExporter.java     |   7 +-
 .../journal/JMSJournalStorageManagerImpl.java   |  23 +-
 .../core/journal/SequentialFileFactory.java     |   3 +-
 .../core/journal/impl/AIOSequentialFile.java    |   8 +-
 .../journal/impl/AIOSequentialFileFactory.java  |   9 +-
 .../journal/impl/AbstractSequentialFile.java    |   8 +-
 .../impl/AbstractSequentialFileFactory.java     |  14 +-
 .../core/journal/impl/CompactJournal.java       |   6 +-
 .../core/journal/impl/NIOSequentialFile.java    |  17 +-
 .../journal/impl/NIOSequentialFileFactory.java  |  13 +-
 .../core/journal/impl/SyncSpeedTest.java        |   8 +-
 .../artemis/maven/InVMNodeManagerServer.java    |   4 +-
 .../artemis/server/ActiveMQBootstrap.java       |   2 +-
 .../artemis/core/config/Configuration.java      |  32 +++
 .../core/config/impl/ConfigurationImpl.java     |  69 ++++++
 .../artemis/core/paging/PagingStore.java        |   3 +-
 .../core/paging/impl/PagingStoreFactoryNIO.java |  12 +-
 .../core/paging/impl/PagingStoreImpl.java       |   3 +-
 .../impl/journal/DescribeJournal.java           |   7 +-
 .../impl/journal/JournalStorageManager.java     |  52 ++--
 .../core/replication/ReplicationEndpoint.java   |   2 +-
 .../artemis/core/server/NodeManager.java        |   4 +-
 .../server/impl/AIOFileLockNodeManager.java     |   4 +-
 .../core/server/impl/ActiveMQServerImpl.java    |  10 +-
 .../core/server/impl/FileLockNodeManager.java   |   5 +-
 .../core/server/impl/InVMNodeManager.java       |  13 +-
 .../artemis/tests/util/ActiveMQTestBase.java    |  19 +-
 .../tests/util/ColocatedActiveMQServer.java     |   4 +-
 .../tests/util/InVMNodeManagerServer.java       |   4 +-
 .../integration/client/HangConsumerTest.java    |  20 +-
 .../integration/client/JournalCrashTest.java    |   3 +-
 .../tests/integration/client/PagingTest.java    |  36 +--
 .../client/RedeliveryConsumerTest.java          |   2 +-
 .../integration/cluster/NodeManagerAction.java  |   4 +-
 .../cluster/RealNodeManagerTest.java            |   3 +-
 .../integration/cluster/bridge/BridgeTest.java  |  26 +-
 .../cluster/distribution/ClusterTestBase.java   |  40 ++--
 .../cluster/failover/BackupSyncJournalTest.java |  20 +-
 .../cluster/failover/FailoverTestBase.java      |  18 +-
 .../journal/AIOImportExportTest.java            |   2 +-
 .../journal/AIOJournalCompactTest.java          |   2 +-
 .../integration/journal/AIOJournalImplTest.java |   2 +-
 .../journal/AIOSequentialFileFactoryTest.java   |   3 +-
 .../journal/JournalPerfTuneTest.java            | 238 -------------------
 .../journal/NIOBufferedJournalCompactTest.java  |   2 +-
 .../journal/NIOImportExportTest.java            |   6 +-
 .../journal/NIOJournalCompactTest.java          |   2 +-
 .../integration/journal/NIOJournalImplTest.java |   2 +-
 .../journal/NIONoBufferJournalImplTest.java     |   2 +-
 ...NIONonBufferedSequentialFileFactoryTest.java |   4 +-
 .../journal/NIOSequentialFileFactoryTest.java   |   4 +-
 .../integration/journal/OldFormatTest.java      | 148 ------------
 .../integration/journal/RelativePathTest.java   | 126 ++++++++++
 .../journal/ValidateTransactionHealthTest.java  |   6 +-
 .../replication/ReplicationTest.java            |  32 +--
 .../artemis/tests/util/JournalExample.java      | 158 ------------
 .../journal/RealJournalImplAIOTest.java         |   2 +-
 .../journal/RealJournalImplNIOTest.java         |   2 +-
 .../AIOAllPossibilitiesCompactStressTest.java   |   2 +-
 .../stress/journal/AddAndRemoveStressTest.java  |  12 +-
 .../JournalCleanupCompactStressTest.java        |   4 +-
 .../stress/journal/MixupCompactorTestBase.java  |   2 +-
 .../NIOMultiThreadCompactorStressTest.java      |  15 +-
 .../core/journal/impl/AIOJournalImplTest.java   |   2 +-
 .../core/journal/impl/NIOJournalImplTest.java   |  13 +-
 .../unit/core/journal/impl/CleanBufferTest.java |  15 +-
 .../impl/fakes/FakeSequentialFileFactory.java   |   2 +-
 .../tests/unit/core/paging/impl/PageTest.java   |   8 +-
 .../core/paging/impl/PagingManagerImplTest.java |   2 +-
 .../core/paging/impl/PagingStoreImplTest.java   |   7 +-
 .../impl/BatchIDGeneratorUnitTest.java          |   3 +-
 .../unit/core/server/impl/FileLockTest.java     |  12 +-
 79 files changed, 541 insertions(+), 876 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
index 640243f..651620f 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Configurable.java
@@ -124,7 +124,7 @@ public abstract class Configurable extends ActionAbstract
       {
          if (getBrokerInstance() == null)
          {
-            final String defaultLocation = "../data";
+            final String defaultLocation = "./data";
             fileConfiguration = new FileConfiguration();
             // These will be the default places in case the file can't be loaded
             fileConfiguration.setBindingsDirectory(defaultLocation + "/bindings");

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
index 4450657..8d5f87e 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Create.java
@@ -98,8 +98,8 @@ public class Create extends InputAbstract
    @Option(name = "--home", description = "Directory where ActiveMQ Artemis is installed")
    File home;
 
-   @Option(name = "--data", description = "Directory where ActiveMQ Data is used. Path are relative to artemis.instance/bin")
-   String data = "../data";
+   @Option(name = "--data", description = "Directory where ActiveMQ Data is used. Path are relative to artemis.instance")
+   String data = "./data";
 
    @Option(name = "--clustered", description = "Enable clustering")
    boolean clustered = false;
@@ -131,7 +131,7 @@ public class Create extends InputAbstract
    @Option(name = "--allow-anonymous", description = "Enables anonymous configuration on security (Default: input)")
    Boolean allowAnonymous = null;
 
-   @Option(name = "--require-login", description = "This will configure security to require user / password. Compliment --allow-anonymous")
+   @Option(name = "--require-login", description = "This will configure security to require user / password. Compliments --allow-anonymous")
    Boolean requireLogin = null;
 
    @Option(name = "--user", description = "The username (Default: input)")

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
index 34a3007..8679600 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/Run.java
@@ -84,10 +84,10 @@ public class Run extends Configurable
 
    private void createDirectories(FileConfiguration fileConfiguration)
    {
-      new File(fileConfiguration.getBindingsDirectory()).mkdirs();
-      new File(fileConfiguration.getJournalDirectory()).mkdirs();
-      new File(fileConfiguration.getPagingDirectory()).mkdirs();
-      new File(fileConfiguration.getLargeMessagesDirectory()).mkdirs();
+      fileConfiguration.getPagingLocation().mkdirs();
+      fileConfiguration.getJournalLocation().mkdirs();
+      fileConfiguration.getBindingsLocation().mkdirs();
+      fileConfiguration.getLargeMessagesLocation().mkdirs();
    }
 
    /**
@@ -137,7 +137,6 @@ public class Run extends Configurable
                {
                   try
                   {
-                     //TODO stop components
                      server.stop();
                   }
                   catch (Exception e)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DataAbstract.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DataAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DataAbstract.java
index 687399a..ecd2e37 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DataAbstract.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DataAbstract.java
@@ -42,7 +42,7 @@ public abstract class DataAbstract extends Configurable
    {
       if (largeMessges == null)
       {
-         largeMessges = getFileConfiguration().getLargeMessagesDirectory();
+         largeMessges = getFileConfiguration().getLargeMessagesLocation().getAbsolutePath();
       }
 
       checkIfDirectoryExists(largeMessges);
@@ -55,7 +55,7 @@ public abstract class DataAbstract extends Configurable
    {
       if (binding == null)
       {
-         binding = getFileConfiguration().getBindingsDirectory();
+         binding = getFileConfiguration().getBindingsLocation().getAbsolutePath();
       }
 
       checkIfDirectoryExists(binding);
@@ -67,7 +67,7 @@ public abstract class DataAbstract extends Configurable
    {
       if (journal == null)
       {
-         journal = getFileConfiguration().getJournalDirectory();
+         journal = getFileConfiguration().getJournalLocation().getAbsolutePath();
       }
 
       checkIfDirectoryExists(journal);
@@ -79,7 +79,7 @@ public abstract class DataAbstract extends Configurable
    {
       if (paging == null)
       {
-         paging = getFileConfiguration().getPagingDirectory();
+         paging = getFileConfiguration().getPagingLocation().getAbsolutePath();
       }
 
       checkIfDirectoryExists(paging);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java
index 966fc5d..5b28a18 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/DecodeJournal.java
@@ -117,7 +117,7 @@ public class DecodeJournal extends Configurable implements Action
             System.err.println("Could not create directory " + directory);
       }
 
-      NIOSequentialFileFactory nio = new NIOSequentialFileFactory(directory, null);
+      NIOSequentialFileFactory nio = new NIOSequentialFileFactory(new File(directory), null);
 
       JournalImpl journal = new JournalImpl(fileSize, minFiles, 0, 0, nio, journalPrefix, journalSuffix, 1);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java
index 093874c..8b0721b 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/EncodeJournal.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.cli.commands.tools;
 
 import java.io.BufferedOutputStream;
+import java.io.File;
 import java.io.FileOutputStream;
 import java.io.PrintStream;
 import java.util.List;
@@ -112,7 +113,7 @@ public class EncodeJournal extends Configurable implements Action
                                     final int fileSize,
                                     final PrintStream out) throws Exception
    {
-      NIOSequentialFileFactory nio = new NIOSequentialFileFactory(directory, null);
+      NIOSequentialFileFactory nio = new NIOSequentialFileFactory(new File(directory), null);
 
       JournalImpl journal = new JournalImpl(fileSize, minFiles, 0, 0, nio, journalPrefix, journalSuffix, 1);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
index d2b2f99..c9d2e10 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/PrintData.java
@@ -65,7 +65,7 @@ public class PrintData extends DataAbstract implements Action
       super.execute(context);
       try
       {
-         printData(getBinding(), getJournal(), getPaging());
+         printData(new File(getBinding()), new File(getJournal()), new File(getPaging()));
       }
       catch (Exception e)
       {
@@ -74,7 +74,7 @@ public class PrintData extends DataAbstract implements Action
       return null;
    }
 
-   public static void printData(String bindingsDirectory, String messagesDirectory, String pagingDirectory) throws Exception
+   public static void printData(File bindingsDirectory, File messagesDirectory, File pagingDirectory) throws Exception
    {
       // Having the version on the data report is an information very useful to understand what happened
       // When debugging stuff
@@ -148,7 +148,7 @@ public class PrintData extends DataAbstract implements Action
    }
 
 
-   private static void printPages(String pageDirectory, DescribeJournal describeJournal)
+   private static void printPages(File pageDirectory, DescribeJournal describeJournal)
    {
       try
       {
@@ -181,7 +181,7 @@ public class PrintData extends DataAbstract implements Action
          for (SimpleString store : stores)
          {
             PagingStore pgStore = manager.getPageStore(store);
-            String folder = null;
+            File folder = null;
 
             if (pgStore != null)
             {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataExporter.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataExporter.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataExporter.java
index b3615c0..e099a0b 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataExporter.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/tools/XmlDataExporter.java
@@ -19,6 +19,7 @@ package org.apache.activemq.artemis.cli.commands.tools;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
+import java.io.File;
 import java.io.OutputStream;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
@@ -344,7 +345,7 @@ public final class XmlDataExporter extends DataAbstract implements Action
 
    private void getJmsBindings() throws Exception
    {
-      SequentialFileFactory bindingsJMS = new NIOSequentialFileFactory(config.getBindingsDirectory());
+      SequentialFileFactory bindingsJMS = new NIOSequentialFileFactory(config.getBindingsLocation());
 
       Journal jmsJournal = new JournalImpl(1024 * 1024,
                                            2,
@@ -764,7 +765,7 @@ public final class XmlDataExporter extends DataAbstract implements Action
             }
          };
          PagingStoreFactory pageStoreFactory =
-            new PagingStoreFactoryNIO(storageManager, config.getPagingDirectory(), 1000L, scheduled, executorFactory, true,
+            new PagingStoreFactoryNIO(storageManager, config.getPagingLocation(), 1000L, scheduled, executorFactory, true,
                                       null);
          HierarchicalRepository<AddressSettings> addressSettingsRepository = new HierarchicalObjectRepository<>();
          addressSettingsRepository.setDefault(new AddressSettings());
@@ -780,7 +781,7 @@ public final class XmlDataExporter extends DataAbstract implements Action
 
             if (pageStore != null)
             {
-               String folder = pageStore.getFolder();
+               File folder = pageStore.getFolder();
                ActiveMQServerLogger.LOGGER.debug("Reading page store " + store + " folder = " + folder);
 
                int pageId = (int) pageStore.getFirstPage();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java
index ce68660..46c9bf2 100644
--- a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java
+++ b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/persistence/impl/journal/JMSJournalStorageManagerImpl.java
@@ -57,8 +57,6 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager
 
    private final IDGenerator idGenerator;
 
-   private final String journalDir;
-
    private final boolean createDir;
 
    private final Journal jmsJournal;
@@ -71,6 +69,8 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager
 
    private final Map<Pair<PersistedType, String>, PersistedBindings> mapBindings = new ConcurrentHashMap<Pair<PersistedType, String>, PersistedBindings>();
 
+   private final Configuration config;
+
    // Static --------------------------------------------------------
 
    // Constructors --------------------------------------------------
@@ -83,17 +83,11 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager
          throw new IllegalArgumentException("Only NIO and AsyncIO are supported journals");
       }
 
-      // Will use the same place as the bindings directory from the core journal
-      journalDir = config.getBindingsDirectory();
-
-      if (journalDir == null)
-      {
-         throw new NullPointerException("bindings-dir is null");
-      }
+      this.config = config;
 
       createDir = config.isCreateBindingsDir();
 
-      SequentialFileFactory bindingsJMS = new NIOSequentialFileFactory(journalDir);
+      SequentialFileFactory bindingsJMS = new NIOSequentialFileFactory(config.getJournalLocation());
 
       Journal localJMS = new JournalImpl(1024 * 1024,
                                          2,
@@ -265,7 +259,7 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager
    public void start() throws Exception
    {
 
-      checkAndCreateDir(journalDir, createDir);
+      checkAndCreateDir(config.getJournalLocation(), createDir);
 
       jmsJournal.start();
 
@@ -335,15 +329,14 @@ public final class JMSJournalStorageManagerImpl implements JMSStorageManager
    // Private -------------------------------------------------------
 
 
-   private void checkAndCreateDir(final String dir, final boolean create)
+   private void checkAndCreateDir(final File dir, final boolean create)
    {
-      File f = new File(dir);
 
-      if (!f.exists())
+      if (!dir.exists())
       {
          if (create)
          {
-            if (!f.mkdirs())
+            if (!dir.mkdirs())
             {
                throw new IllegalStateException("Failed to create directory " + dir);
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/SequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/SequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/SequentialFileFactory.java
index 867b3b5..cb47bd9 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/SequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/SequentialFileFactory.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.journal;
 
+import java.io.File;
 import java.nio.ByteBuffer;
 import java.util.List;
 
@@ -71,7 +72,7 @@ public interface SequentialFileFactory
 
    int calculateBlockSize(int bytes);
 
-   String getDirectory();
+   File getDirectory();
 
    void clearBuffer(ByteBuffer buffer);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFile.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFile.java
index 27c1835..acef8a5 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFile.java
@@ -46,14 +46,14 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep
    public AIOSequentialFile(final SequentialFileFactory factory,
                             final int bufferSize,
                             final long bufferTimeoutMilliseconds,
-                            final String directory,
+                            final File directory,
                             final String fileName,
                             final int maxIO,
                             final BufferCallback bufferCallback,
                             final Executor writerExecutor,
                             final Executor pollerExecutor)
    {
-      super(directory, new File(directory + "/" + fileName), factory, writerExecutor);
+      super(directory, fileName, factory, writerExecutor);
       this.maxIO = maxIO;
       this.bufferCallback = bufferCallback;
       this.pollerExecutor = pollerExecutor;
@@ -85,8 +85,8 @@ public class AIOSequentialFile extends AbstractSequentialFile implements IOExcep
       return new AIOSequentialFile(factory,
                                    -1,
                                    -1,
-                                   getFile().getParent(),
-                                   getFileName(),
+                                   getFile().getParentFile(),
+                                   getFile().getName(),
                                    maxIO,
                                    bufferCallback,
                                    writerExecutor,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFileFactory.java
index db7d8ed..65e6a6f 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AIOSequentialFileFactory.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.journal.impl;
 
+import java.io.File;
 import java.nio.ByteBuffer;
 import java.security.AccessController;
 import java.security.PrivilegedAction;
@@ -49,7 +50,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
       ActiveMQJournalLogger.LOGGER.trace(message);
    }
 
-   public AIOSequentialFileFactory(final String journalDir)
+   public AIOSequentialFileFactory(final File journalDir)
    {
       this(journalDir,
            JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
@@ -58,7 +59,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
            null);
    }
 
-   public AIOSequentialFileFactory(final String journalDir, final IOCriticalErrorListener listener)
+   public AIOSequentialFileFactory(final File journalDir, final IOCriticalErrorListener listener)
    {
       this(journalDir,
            JournalConstants.DEFAULT_JOURNAL_BUFFER_SIZE_AIO,
@@ -67,7 +68,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
            listener);
    }
 
-   public AIOSequentialFileFactory(final String journalDir,
+   public AIOSequentialFileFactory(final File journalDir,
                                    final int bufferSize,
                                    final int bufferTimeout,
                                    final boolean logRates)
@@ -75,7 +76,7 @@ public final class AIOSequentialFileFactory extends AbstractSequentialFileFactor
       this(journalDir, bufferSize, bufferTimeout, logRates, null);
    }
 
-   public AIOSequentialFileFactory(final String journalDir,
+   public AIOSequentialFileFactory(final File journalDir,
                                    final int bufferSize,
                                    final int bufferTimeout,
                                    final boolean logRates,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFile.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFile.java
index 7e1b0f8..a4eed58 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFile.java
@@ -41,7 +41,7 @@ public abstract class AbstractSequentialFile implements SequentialFile
 
    private File file;
 
-   private final String directory;
+   protected final File directory;
 
    protected final SequentialFileFactory factory;
 
@@ -66,13 +66,13 @@ public abstract class AbstractSequentialFile implements SequentialFile
     * @param file
     * @param directory
     */
-   public AbstractSequentialFile(final String directory,
-                                 final File file,
+   public AbstractSequentialFile(final File directory,
+                                 final String file,
                                  final SequentialFileFactory factory,
                                  final Executor writerExecutor)
    {
       super();
-      this.file = file;
+      this.file = new File(directory, file);
       this.directory = directory;
       this.factory = factory;
       this.writerExecutor = writerExecutor;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
index f736001..ec0ab4d 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/AbstractSequentialFileFactory.java
@@ -45,7 +45,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
    // Timeout used to wait executors to shutdown
    protected static final int EXECUTOR_TIMEOUT = 60;
 
-   protected final String journalDir;
+   protected final File journalDir;
 
    protected final TimedBuffer timedBuffer;
 
@@ -62,7 +62,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
     *  */
    protected ExecutorService writeExecutor;
 
-   AbstractSequentialFileFactory(final String journalDir,
+   AbstractSequentialFileFactory(final File journalDir,
                                         final boolean buffered,
                                         final int bufferSize,
                                         final int bufferTimeout,
@@ -109,7 +109,8 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
       }
    }
 
-   public String getDirectory()
+   @Override
+   public File getDirectory()
    {
       return journalDir;
    }
@@ -175,8 +176,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
     */
    public void createDirs() throws Exception
    {
-      File file = new File(journalDir);
-      boolean ok = file.mkdirs();
+      boolean ok = journalDir.mkdirs();
       if (!ok)
       {
          throw new IOException("Failed to create directory " + journalDir);
@@ -185,8 +185,6 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
 
    public List<String> listFiles(final String extension) throws Exception
    {
-      File dir = new File(journalDir);
-
       FilenameFilter fnf = new FilenameFilter()
       {
          public boolean accept(final File file, final String name)
@@ -195,7 +193,7 @@ abstract class AbstractSequentialFileFactory implements SequentialFileFactory
          }
       };
 
-      String[] fileNames = dir.list(fnf);
+      String[] fileNames = journalDir.list(fnf);
 
       if (fileNames == null)
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/CompactJournal.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/CompactJournal.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/CompactJournal.java
index 7586990..6f5b75c 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/CompactJournal.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/CompactJournal.java
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.artemis.core.journal.impl;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.journal.IOCriticalErrorListener;
 
 /**
@@ -38,7 +40,7 @@ public final class CompactJournal // NO_UCD
 
       try
       {
-         CompactJournal.compactJournal(arg[0], arg[1], arg[2], 2, Integer.parseInt(arg[3]), null);
+         CompactJournal.compactJournal(new File(arg[0]), arg[1], arg[2], 2, Integer.parseInt(arg[3]), null);
       }
       catch (Exception e)
       {
@@ -47,7 +49,7 @@ public final class CompactJournal // NO_UCD
 
    }
 
-   static void compactJournal(final String directory,
+   static void compactJournal(final File directory,
                                      final String journalPrefix,
                                      final String journalSuffix,
                                      final int minFiles,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFile.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFile.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFile.java
index 65ec8af..0dac7f2 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFile.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFile.java
@@ -51,21 +51,12 @@ public final class NIOSequentialFile extends AbstractSequentialFile
    private int maxIO;
 
    public NIOSequentialFile(final SequentialFileFactory factory,
-                            final String directory,
-                            final String fileName,
+                            final File directory,
+                            final String file,
                             final int maxIO,
                             final Executor writerExecutor)
    {
-      super(directory, new File(directory + "/" + fileName), factory, writerExecutor);
-      defaultMaxIO = maxIO;
-   }
-
-   public NIOSequentialFile(final SequentialFileFactory factory,
-                            final File file,
-                            final int maxIO,
-                            final Executor writerExecutor)
-   {
-      super(file.getParent(), new File(file.getPath()), factory, writerExecutor);
+      super(directory, file, factory, writerExecutor);
       defaultMaxIO = maxIO;
    }
 
@@ -284,7 +275,7 @@ public final class NIOSequentialFile extends AbstractSequentialFile
 
    public SequentialFile cloneFile()
    {
-      return new NIOSequentialFile(factory, getFile(), maxIO, writerExecutor);
+      return new NIOSequentialFile(factory, directory, getFileName(), maxIO, writerExecutor);
    }
 
    public void writeDirect(final ByteBuffer bytes, final boolean sync, final IOAsyncTask callback)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFileFactory.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFileFactory.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFileFactory.java
index ad9d2fa..e471928 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFileFactory.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/NIOSequentialFileFactory.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.journal.impl;
 
+import java.io.File;
 import java.lang.ref.WeakReference;
 import java.nio.ByteBuffer;
 
@@ -24,12 +25,12 @@ import org.apache.activemq.artemis.core.journal.SequentialFile;
 
 public class NIOSequentialFileFactory extends AbstractSequentialFileFactory
 {
-   public NIOSequentialFileFactory(final String journalDir)
+   public NIOSequentialFileFactory(final File journalDir)
    {
       this(journalDir, null);
    }
 
-   public NIOSequentialFileFactory(final String journalDir, final IOCriticalErrorListener listener)
+   public NIOSequentialFileFactory(final File journalDir, final IOCriticalErrorListener listener)
    {
       this(journalDir,
            false,
@@ -39,12 +40,12 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory
            listener);
    }
 
-   public NIOSequentialFileFactory(final String journalDir, final boolean buffered)
+   public NIOSequentialFileFactory(final File journalDir, final boolean buffered)
    {
       this(journalDir, buffered, null);
    }
 
-   public NIOSequentialFileFactory(final String journalDir,
+   public NIOSequentialFileFactory(final File journalDir,
                                    final boolean buffered,
                                    final IOCriticalErrorListener listener)
    {
@@ -56,7 +57,7 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory
            listener);
    }
 
-   public NIOSequentialFileFactory(final String journalDir,
+   public NIOSequentialFileFactory(final File journalDir,
                                    final boolean buffered,
                                    final int bufferSize,
                                    final int bufferTimeout,
@@ -65,7 +66,7 @@ public class NIOSequentialFileFactory extends AbstractSequentialFileFactory
       this(journalDir, buffered, bufferSize, bufferTimeout, logRates, null);
    }
 
-   public NIOSequentialFileFactory(final String journalDir,
+   public NIOSequentialFileFactory(final File journalDir,
                                    final boolean buffered,
                                    final int bufferSize,
                                    final int bufferTimeout,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SyncSpeedTest.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SyncSpeedTest.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SyncSpeedTest.java
index f6d7758..0c982dc 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SyncSpeedTest.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/SyncSpeedTest.java
@@ -59,11 +59,11 @@ public class SyncSpeedTest
    {
       if (AIO)
       {
-         fileFactory = new AIOSequentialFileFactory(".", 0, 0, false, null);
+         fileFactory = new AIOSequentialFileFactory(new File("."), 0, 0, false, null);
       }
       else
       {
-         fileFactory = new NIOSequentialFileFactory(".", false, 0, 0, false, null);
+         fileFactory = new NIOSequentialFileFactory(new File("."), false, 0, 0, false, null);
       }
    }
 
@@ -74,7 +74,7 @@ public class SyncSpeedTest
          return new AIOSequentialFile(fileFactory,
                                       0,
                                       0,
-                                      ".",
+                                      new File("."),
                                       fileName,
                                       100000,
                                       null,
@@ -83,7 +83,7 @@ public class SyncSpeedTest
       }
       else
       {
-         return new NIOSequentialFile(fileFactory, new File(fileName), 1000, null);
+         return new NIOSequentialFile(fileFactory, new File("."), fileName, 1000, null);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/InVMNodeManagerServer.java
----------------------------------------------------------------------
diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/InVMNodeManagerServer.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/InVMNodeManagerServer.java
index 139088c..b8b1a67 100644
--- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/InVMNodeManagerServer.java
+++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/maven/InVMNodeManagerServer.java
@@ -18,6 +18,8 @@ package org.apache.activemq.artemis.maven;
 
 import javax.management.MBeanServer;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
@@ -65,7 +67,7 @@ public final class InVMNodeManagerServer extends ActiveMQServerImpl
    }
 
    @Override
-   protected NodeManager createNodeManager(final String directory, boolean replicatingBackup)
+   protected NodeManager createNodeManager(final File directory, boolean replicatingBackup)
    {
       return nodeManager;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java
----------------------------------------------------------------------
diff --git a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java
index 0e29bb5..35f38da 100644
--- a/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java
+++ b/artemis-maven-plugin/src/main/java/org/apache/activemq/artemis/server/ActiveMQBootstrap.java
@@ -174,7 +174,7 @@ public class ActiveMQBootstrap
          if (nodeManager == null)
          {
             boolean replicatedBackup = configuration.getHAPolicyConfiguration().getType() == HAPolicyConfiguration.TYPE.REPLICA;
-            nodeManager = new InVMNodeManager(replicatedBackup, configuration.getJournalDirectory());
+            nodeManager = new InVMNodeManager(replicatedBackup, configuration.getJournalLocation());
             managerMap.put(nodeId, nodeManager);
          }
          server = new InVMNodeManagerServer(configuration, ManagementFactory.getPlatformMBeanServer(),

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
index a78c5b5..0c1bc3c 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/Configuration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.config;
 
+import java.io.File;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -435,6 +436,11 @@ public interface Configuration
    String getBindingsDirectory();
 
    /**
+    * The binding location related to artemis.instance.
+    */
+   File getBindingsLocation();
+
+   /**
     * Sets the file system directory used to store bindings.
     */
    Configuration setBindingsDirectory(String dir);
@@ -460,6 +466,12 @@ public interface Configuration
    String getJournalDirectory();
 
    /**
+    * The location of the journal related to artemis.instance.
+    * @return
+    */
+   File getJournalLocation();
+
+   /**
     * Sets the file system directory used to store journal log.
     */
    Configuration setJournalDirectory(String dir);
@@ -675,6 +687,12 @@ public interface Configuration
     */
    Configuration setPagingDirectory(String dir);
 
+
+   /**
+    * The paging location related to artemis.instance
+    */
+   File getPagingLocation();
+
    // Large Messages Properties ------------------------------------------------------------
 
    /**
@@ -683,6 +701,9 @@ public interface Configuration
     */
    String getLargeMessagesDirectory();
 
+   /** The large message location related to artemis.instance */
+   File getLargeMessagesLocation();
+
    /**
     * Sets the file system directory used to store large messages.
     */
@@ -864,4 +885,15 @@ public interface Configuration
    HAPolicyConfiguration getHAPolicyConfiguration();
 
    Configuration setHAPolicyConfiguration(HAPolicyConfiguration haPolicyConfiguration);
+
+   /**
+    * Set the Artemis instance relative folder for data and stuff.
+    */
+   void setArtemisInstance(File directory);
+
+   /**
+    * Set the Artemis instance relative folder for data and stuff.
+    */
+   File getArtemisInstance();
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
index 7f77acc..aa14434 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
@@ -18,9 +18,11 @@ package org.apache.activemq.artemis.core.config.impl;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.File;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import java.io.Serializable;
+import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -217,6 +219,11 @@ public class ConfigurationImpl implements Configuration, Serializable
 
    private HAPolicyConfiguration haPolicyConfiguration;
 
+   /**
+    * Parent folder for all data folders.
+    */
+   private File artemisInstance;
+
    // Public -------------------------------------------------------------------------
 
    public boolean isClustered()
@@ -524,6 +531,11 @@ public class ConfigurationImpl implements Configuration, Serializable
       return this;
    }
 
+   public File getBindingsLocation()
+   {
+      return subFolder(getBindingsDirectory());
+   }
+
    public String getBindingsDirectory()
    {
       return bindingsDirectory;
@@ -549,6 +561,10 @@ public class ConfigurationImpl implements Configuration, Serializable
       return this;
    }
 
+   public File getJournalLocation()
+   {
+      return subFolder(getJournalDirectory());
+   }
 
    public String getJournalDirectory()
    {
@@ -572,6 +588,11 @@ public class ConfigurationImpl implements Configuration, Serializable
       return this;
    }
 
+   public File getPagingLocation()
+   {
+      return subFolder(getPagingDirectory());
+   }
+
    public String getPagingDirectory()
    {
       return pagingDirectory;
@@ -797,6 +818,11 @@ public class ConfigurationImpl implements Configuration, Serializable
       return largeMessagesDirectory;
    }
 
+   public File getLargeMessagesLocation()
+   {
+      return subFolder(getLargeMessagesDirectory());
+   }
+
    public ConfigurationImpl setLargeMessagesDirectory(final String directory)
    {
       largeMessagesDirectory = directory;
@@ -1077,6 +1103,30 @@ public class ConfigurationImpl implements Configuration, Serializable
       return this.connectorServiceConfigurations;
    }
 
+   public File getArtemisInstance()
+   {
+      if (artemisInstance != null)
+      {
+         return artemisInstance;
+      }
+
+      String strartemisInstance = System.getProperty("artemis.instance");
+
+      if (strartemisInstance == null)
+      {
+         strartemisInstance = System.getProperty("user.dir");
+      }
+
+      artemisInstance = new File(strartemisInstance);
+
+      return artemisInstance;
+   }
+
+   public void setArtemisInstance(File directory)
+   {
+      this.artemisInstance = directory;
+   }
+
    public boolean isCheckForLiveServer()
    {
       if (haPolicyConfiguration instanceof ReplicaPolicyConfiguration)
@@ -1568,4 +1618,23 @@ public class ConfigurationImpl implements Configuration, Serializable
       this.haPolicyConfiguration = haPolicyConfiguration;
       return this;
    }
+
+   /**
+    * It will find the right location of a subFolder, related to artemisInstance
+    */
+   private File subFolder(String subFolder)
+   {
+      try
+      {
+         // Resolve wont work without "/" as the last character
+         URI artemisHome = new URI(getArtemisInstance().toURI() + "/");
+         URI relative = artemisHome.resolve(subFolder);
+         return new File(relative.getPath());
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
index 735c6db..3b74e45 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/PagingStore.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.paging;
 
+import java.io.File;
 import java.util.Collection;
 import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
 
@@ -53,7 +54,7 @@ public interface PagingStore extends ActiveMQComponent
 
    SimpleString getStoreName();
 
-   String getFolder();
+   File getFolder();
 
    AddressFullMessagePolicy getAddressFullMessagePolicy();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java
index b6b9b72..3a12b96 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreFactoryNIO.java
@@ -55,7 +55,7 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory
 
    // Attributes ----------------------------------------------------
 
-   private final String directory;
+   private final File directory;
 
    private final ExecutorFactory executorFactory;
 
@@ -71,7 +71,7 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory
 
    private final IOCriticalErrorListener critialErrorListener;
 
-   public PagingStoreFactoryNIO(final StorageManager storageManager, final String directory,
+   public PagingStoreFactoryNIO(final StorageManager storageManager, final File directory,
                                 final long syncTimeout,
                                 final ScheduledExecutorService scheduledExecutor,
                                 final ExecutorFactory executorFactory,
@@ -118,7 +118,7 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory
 
       factory.createDirs();
 
-      File fileWithID = new File(directory + File.separatorChar +
+      File fileWithID = new File(directory,
                                  guid +
                                  File.separatorChar +
                                  PagingStoreFactoryNIO.ADDRESS_FILE);
@@ -145,9 +145,7 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory
 
    public List<PagingStore> reloadStores(final HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception
    {
-      File pageDirectory = new File(directory);
-
-      File[] files = pageDirectory.listFiles();
+      File[] files = directory.listFiles();
 
       if (files == null)
       {
@@ -210,6 +208,6 @@ public class PagingStoreFactoryNIO implements PagingStoreFactory
 
    private SequentialFileFactory newFileFactory(final String directoryName)
    {
-      return new NIOSequentialFileFactory(directory + File.separatorChar + directoryName, false, critialErrorListener);
+      return new NIOSequentialFileFactory(new File(directory, directoryName), false, critialErrorListener);
    }
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
index 53a7bc9..78cbbc3 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagingStoreImpl.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.paging.impl;
 
+import java.io.File;
 import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -264,7 +265,7 @@ public class PagingStoreImpl implements PagingStore
       return pageSize;
    }
 
-   public String getFolder()
+   public File getFolder()
    {
       SequentialFileFactory factoryUsed = this.fileFactory;
       if (factoryUsed != null)

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java
index b6972ba..3c25164 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/DescribeJournal.java
@@ -17,6 +17,7 @@
 package org.apache.activemq.artemis.core.persistence.impl.journal;
 
 import javax.transaction.xa.Xid;
+import java.io.File;
 import java.io.PrintStream;
 import java.util.HashMap;
 import java.util.LinkedList;
@@ -105,7 +106,7 @@ public final class DescribeJournal
       return preparedTransactions;
    }
 
-   public static void describeBindingsJournal(final String bindingsDir) throws Exception
+   public static void describeBindingsJournal(final File bindingsDir) throws Exception
    {
 
       SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir, null);
@@ -114,7 +115,7 @@ public final class DescribeJournal
       describeJournal(bindingsFF, bindings, bindingsDir);
    }
 
-   public static DescribeJournal describeMessagesJournal(final String messagesDir) throws Exception
+   public static DescribeJournal describeMessagesJournal(final File messagesDir) throws Exception
    {
 
       SequentialFileFactory messagesFF = new NIOSequentialFileFactory(messagesDir, null);
@@ -139,7 +140,7 @@ public final class DescribeJournal
     * @param journal
     * @throws Exception
     */
-   private static DescribeJournal describeJournal(SequentialFileFactory fileFactory, JournalImpl journal, final String path) throws Exception
+   private static DescribeJournal describeJournal(SequentialFileFactory fileFactory, JournalImpl journal, final File path) throws Exception
    {
       List<JournalFile> files = journal.orderFiles();
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
index b3508f7..e74215d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/persistence/impl/journal/JournalStorageManager.java
@@ -201,18 +201,12 @@ public class JournalStorageManager implements StorageManager
 
    private final int perfBlastPages;
 
-   private final boolean createBindingsDir;
-
-   private final String bindingsDir;
-
-   private final boolean createJournalDir;
-
-   private final String journalDir;
-
    private final String largeMessagesDirectory;
 
    private boolean journalLoaded = false;
 
+   private final Configuration config;
+
    // Persisted core configuration
    private final Map<SimpleString, PersistedRoles> mapPersistedRoles =
       new ConcurrentHashMap<SimpleString, PersistedRoles>();
@@ -232,6 +226,8 @@ public class JournalStorageManager implements StorageManager
    {
       this.executorFactory = executorFactory;
 
+      this.config = config;
+
       executor = executorFactory.getExecutor();
 
       if (config.getJournalType() != JournalType.NIO && config.getJournalType() != JournalType.ASYNCIO)
@@ -239,17 +235,8 @@ public class JournalStorageManager implements StorageManager
          throw ActiveMQMessageBundle.BUNDLE.invalidJournal();
       }
 
-      bindingsDir = config.getBindingsDirectory();
-      if (bindingsDir == null)
-      {
-         throw new NullPointerException("bindings-dir is null");
-      }
 
-      createBindingsDir = config.isCreateBindingsDir();
-
-      journalDir = config.getJournalDirectory();
-
-      SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(bindingsDir, criticalErrorListener);
+      SequentialFileFactory bindingsFF = new NIOSequentialFileFactory(config.getBindingsLocation(), criticalErrorListener);
 
       Journal localBindings = new JournalImpl(1024 * 1024,
                                               2,
@@ -263,13 +250,6 @@ public class JournalStorageManager implements StorageManager
       bindingsJournal = localBindings;
       originalBindingsJournal = localBindings;
 
-      if (journalDir == null)
-      {
-         throw new NullPointerException("journal-dir is null");
-      }
-
-      createJournalDir = config.isCreateJournalDir();
-
       syncNonTransactional = config.isJournalSyncNonTransactional();
 
       syncTransactional = config.isJournalSyncTransactional();
@@ -278,7 +258,7 @@ public class JournalStorageManager implements StorageManager
       {
          ActiveMQServerLogger.LOGGER.journalUseAIO();
 
-         journalFF = new AIOSequentialFileFactory(journalDir,
+         journalFF = new AIOSequentialFileFactory(config.getJournalLocation(),
                                                   config.getJournalBufferSize_AIO(),
                                                   config.getJournalBufferTimeout_AIO(),
                                                   config.isLogJournalWriteRate(),
@@ -287,7 +267,7 @@ public class JournalStorageManager implements StorageManager
       else if (config.getJournalType() == JournalType.NIO)
       {
          ActiveMQServerLogger.LOGGER.journalUseNIO();
-         journalFF = new NIOSequentialFileFactory(journalDir,
+         journalFF = new NIOSequentialFileFactory(config.getJournalLocation(),
                                                   true,
                                                   config.getJournalBufferSize_NIO(),
                                                   config.getJournalBufferTimeout_NIO(),
@@ -316,7 +296,7 @@ public class JournalStorageManager implements StorageManager
 
       largeMessagesDirectory = config.getLargeMessagesDirectory();
 
-      largeMessagesFactory = new NIOSequentialFileFactory(largeMessagesDirectory, false, criticalErrorListener);
+      largeMessagesFactory = new NIOSequentialFileFactory(config.getLargeMessagesLocation(), false, criticalErrorListener);
 
       perfBlastPages = config.getJournalPerfBlastPages();
 
@@ -2242,11 +2222,11 @@ public class JournalStorageManager implements StorageManager
          return;
       }
 
-      checkAndCreateDir(bindingsDir, createBindingsDir);
+      checkAndCreateDir(config.getBindingsLocation(), config.isCreateBindingsDir());
 
-      checkAndCreateDir(journalDir, createJournalDir);
+      checkAndCreateDir(config.getJournalLocation(), config.isCreateJournalDir());
 
-      checkAndCreateDir(largeMessagesDirectory, createJournalDir);
+      checkAndCreateDir(config.getLargeMessagesLocation(), config.isCreateJournalDir());
 
       cleanupIncompleteFiles();
 
@@ -2524,22 +2504,20 @@ public class JournalStorageManager implements StorageManager
 
    // Private ----------------------------------------------------------------------------------
 
-   private void checkAndCreateDir(final String dir, final boolean create)
+   private void checkAndCreateDir(final File dir, final boolean create)
    {
-      File f = new File(dir);
-
-      if (!f.exists())
+      if (!dir.exists())
       {
          if (create)
          {
-            if (!f.mkdirs())
+            if (!dir.mkdirs())
             {
                throw new IllegalStateException("Failed to create directory " + dir);
             }
          }
          else
          {
-            throw ActiveMQMessageBundle.BUNDLE.cannotCreateDir(dir);
+            throw ActiveMQMessageBundle.BUNDLE.cannotCreateDir(dir.getAbsolutePath());
          }
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
index 63443a7..ec16825 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/replication/ReplicationEndpoint.java
@@ -294,7 +294,7 @@ public final class ReplicationEndpoint implements ChannelHandler, ActiveMQCompon
          }
 
          pageManager =
-            new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, config.getPagingDirectory(),
+            new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, config.getPagingLocation(),
                                                             config.getJournalBufferSize_NIO(),
                                                             server.getScheduledPool(),
                                                             server.getExecutorFactory(),

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java
index 756be5f..82b6398 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/NodeManager.java
@@ -34,7 +34,7 @@ public abstract class NodeManager implements ActiveMQComponent
    private static final String ACCESS_MODE = "rw";
 
    protected final boolean replicatedBackup;
-   private final String directory;
+   private final File directory;
    private final Object nodeIDGuard = new Object();
    private SimpleString nodeID;
    private UUID uuid;
@@ -42,7 +42,7 @@ public abstract class NodeManager implements ActiveMQComponent
 
    protected FileChannel channel;
 
-   public NodeManager(final boolean replicatedBackup, final String directory)
+   public NodeManager(final boolean replicatedBackup, final File directory)
    {
       this.directory = directory;
       this.replicatedBackup = replicatedBackup;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AIOFileLockNodeManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AIOFileLockNodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AIOFileLockNodeManager.java
index e591547..7adee2e 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AIOFileLockNodeManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/AIOFileLockNodeManager.java
@@ -39,12 +39,12 @@ public final class AIOFileLockNodeManager extends FileLockNodeManager
     * @param directory
     * @param replicatingBackup
     */
-   public AIOFileLockNodeManager(final String directory, boolean replicatingBackup)
+   public AIOFileLockNodeManager(final File directory, boolean replicatingBackup)
    {
       super(directory, replicatingBackup);
    }
 
-   public AIOFileLockNodeManager(final String directory, boolean replicatingBackup, long lockAcquisitionTimeout)
+   public AIOFileLockNodeManager(final File directory, boolean replicatingBackup, long lockAcquisitionTimeout)
    {
       super(directory, replicatingBackup);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index d3c1722..f0db70f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -353,7 +353,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
    /*
     * Can be overridden for tests
     */
-   protected NodeManager createNodeManager(final String directory, boolean replicatingBackup)
+   protected NodeManager createNodeManager(final File directory, boolean replicatingBackup)
    {
       NodeManager manager;
       if (!configuration.isPersistenceEnabled())
@@ -396,7 +396,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
       {
          checkJournalDirectory();
 
-         nodeManager = createNodeManager(configuration.getJournalDirectory(), false);
+         nodeManager = createNodeManager(configuration.getJournalLocation(), false);
 
          nodeManager.start();
 
@@ -500,7 +500,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
    {
       nodeManager.stop();
       nodeManager =
-            createNodeManager(configuration.getJournalDirectory(), true);
+            createNodeManager(configuration.getJournalLocation(), true);
    }
 
    public Activation getActivation()
@@ -1603,7 +1603,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
    private PagingManager createPagingManager()
    {
 
-      return new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, configuration.getPagingDirectory(),
+      return new PagingManagerImpl(new PagingStoreFactoryNIO(storageManager, configuration.getPagingLocation(),
                                                              configuration.getJournalBufferTimeout_NIO(),
                                                              scheduledPool,
                                                              executorFactory,
@@ -2240,7 +2240,7 @@ public class ActiveMQServerImpl implements ActiveMQServer
     */
    void checkJournalDirectory()
    {
-      File journalDir = new File(configuration.getJournalDirectory());
+      File journalDir = configuration.getJournalLocation();
 
       if (!journalDir.exists() && configuration.isPersistenceEnabled())
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
index 8a1151d..62902c9 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/FileLockNodeManager.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.core.server.impl;
 
+import java.io.File;
 import java.io.IOException;
 import java.nio.ByteBuffer;
 import java.nio.channels.FileLock;
@@ -50,12 +51,12 @@ public class FileLockNodeManager extends NodeManager
 
    protected boolean interrupted = false;
 
-   public FileLockNodeManager(final String directory, boolean replicatedBackup)
+   public FileLockNodeManager(final File directory, boolean replicatedBackup)
    {
       super(replicatedBackup, directory);
    }
 
-   public FileLockNodeManager(final String directory, boolean replicatedBackup, long lockAcquisitionTimeout)
+   public FileLockNodeManager(final File directory, boolean replicatedBackup, long lockAcquisitionTimeout)
    {
       super(replicatedBackup, directory);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/InVMNodeManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/InVMNodeManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/InVMNodeManager.java
index 2c1afe2..dfd74a4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/InVMNodeManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/InVMNodeManager.java
@@ -16,11 +16,7 @@
  */
 package org.apache.activemq.artemis.core.server.impl;
 
-import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.LIVE;
-import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.FAILING_BACK;
-import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.NOT_STARTED;
-import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.PAUSED;
-
+import java.io.File;
 import java.io.IOException;
 import java.util.concurrent.Semaphore;
 
@@ -29,6 +25,11 @@ import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 
+import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.FAILING_BACK;
+import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.LIVE;
+import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.NOT_STARTED;
+import static org.apache.activemq.artemis.core.server.impl.InVMNodeManager.State.PAUSED;
+
 /**
  * NodeManager used to run multiple servers in the same VM.
  * <p>
@@ -59,7 +60,7 @@ public final class InVMNodeManager extends NodeManager
          throw new RuntimeException("if replicated-backup, we need its journal directory");
    }
 
-   public InVMNodeManager(boolean replicatedBackup, String directory)
+   public InVMNodeManager(boolean replicatedBackup, File directory)
    {
       super(replicatedBackup, directory);
       liveLock = new Semaphore(1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
index c689cf2..8a98be9 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ActiveMQTestBase.java
@@ -897,6 +897,11 @@ public abstract class ActiveMQTestBase extends Assert
       return testDir;
    }
 
+   protected final File getTestDirfile()
+   {
+      return new File(testDir);
+   }
+
    protected final void setTestDir(String testDir)
    {
       this.testDir = testDir;
@@ -983,6 +988,12 @@ public abstract class ActiveMQTestBase extends Assert
       return getPageDir(getTestDir());
    }
 
+   protected File getPageDirFile()
+   {
+      return new File(getPageDir());
+
+   }
+
    /**
     * @return the pageDir
     */
@@ -1883,7 +1894,7 @@ public abstract class ActiveMQTestBase extends Assert
       JournalImpl messagesJournal = null;
       try
       {
-         SequentialFileFactory messagesFF = new NIOSequentialFileFactory(getJournalDir(), null);
+         SequentialFileFactory messagesFF = new NIOSequentialFileFactory(new File(getJournalDir()), null);
 
          messagesJournal = new JournalImpl(config.getJournalFileSize(),
                                            config.getJournalMinFiles(),
@@ -1929,7 +1940,7 @@ public abstract class ActiveMQTestBase extends Assert
    protected HashMap<Integer, AtomicInteger> countJournal(Configuration config) throws Exception
    {
       final HashMap<Integer, AtomicInteger> recordsType = new HashMap<Integer, AtomicInteger>();
-      SequentialFileFactory messagesFF = new NIOSequentialFileFactory(config.getJournalDirectory(), null);
+      SequentialFileFactory messagesFF = new NIOSequentialFileFactory(config.getJournalLocation(), null);
 
       JournalImpl messagesJournal = new JournalImpl(config.getJournalFileSize(),
                                                     config.getJournalMinFiles(),
@@ -1977,7 +1988,7 @@ public abstract class ActiveMQTestBase extends Assert
 
       if (messageJournal)
       {
-         ff = new NIOSequentialFileFactory(config.getJournalDirectory(), null);
+         ff = new NIOSequentialFileFactory(config.getJournalLocation(), null);
          journal = new JournalImpl(config.getJournalFileSize(),
                                    config.getJournalMinFiles(),
                                    0,
@@ -1989,7 +2000,7 @@ public abstract class ActiveMQTestBase extends Assert
       }
       else
       {
-         ff = new NIOSequentialFileFactory(config.getBindingsDirectory(), null);
+         ff = new NIOSequentialFileFactory(config.getJournalLocation(), null);
          journal = new JournalImpl(1024 * 1024,
                                    2,
                                    config.getJournalCompactMinFiles(),

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ColocatedActiveMQServer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ColocatedActiveMQServer.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ColocatedActiveMQServer.java
index 7ad1afe..4f9dd48 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ColocatedActiveMQServer.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/ColocatedActiveMQServer.java
@@ -18,6 +18,8 @@ package org.apache.activemq.artemis.tests.util;
 
 import javax.management.MBeanServer;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.asyncio.impl.AsynchronousFileImpl;
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.impl.FileConfiguration;
@@ -62,7 +64,7 @@ public class ColocatedActiveMQServer extends ActiveMQServerImpl
 
    @Override
    protected NodeManager
-   createNodeManager(final String directory, boolean replicatingBackup)
+   createNodeManager(final File directory, boolean replicatingBackup)
    {
       if (replicatingBackup)
       {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/InVMNodeManagerServer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/InVMNodeManagerServer.java b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/InVMNodeManagerServer.java
index c1409bc..ea887e1 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/InVMNodeManagerServer.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/tests/util/InVMNodeManagerServer.java
@@ -18,6 +18,8 @@ package org.apache.activemq.artemis.tests.util;
 
 import javax.management.MBeanServer;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
@@ -65,7 +67,7 @@ public final class InVMNodeManagerServer extends ActiveMQServerImpl
    }
 
    @Override
-   protected NodeManager createNodeManager(final String directory, boolean replicatingBackup)
+   protected NodeManager createNodeManager(final File directory, boolean replicatingBackup)
    {
       return nodeManager;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
index 61d061c..a6bce80 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
@@ -16,6 +16,15 @@
  */
 package org.apache.activemq.artemis.tests.integration.client;
 
+import javax.management.MBeanServer;
+import java.lang.management.ManagementFactory;
+import java.util.LinkedList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.Interceptor;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -62,15 +71,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.management.MBeanServer;
-import java.lang.management.ManagementFactory;
-import java.util.LinkedList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
 /**
  * This test will simulate a consumer hanging on the delivery packet due to unbehaved clients
  * and it will make sure we can still perform certain operations on the queue such as produce
@@ -480,7 +480,7 @@ public class HangConsumerTest extends ActiveMQTestBase
 
             server.stop();
 
-            SequentialFileFactory messagesFF = new NIOSequentialFileFactory(server.getConfiguration().getBindingsDirectory(), null);
+            SequentialFileFactory messagesFF = new NIOSequentialFileFactory(server.getConfiguration().getBindingsLocation(), null);
 
             JournalImpl messagesJournal = new JournalImpl(1024 * 1024,
                                                           2,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
index 22cdbfe..e71189f 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/JournalCrashTest.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.tests.integration.client;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.Arrays;
 
@@ -220,7 +221,7 @@ public class JournalCrashTest extends ActiveMQTestBase
     */
    private void printJournal() throws Exception
    {
-      NIOSequentialFileFactory factory = new NIOSequentialFileFactory(getJournalDir());
+      NIOSequentialFileFactory factory = new NIOSequentialFileFactory(new File(getJournalDir()));
       JournalImpl journal = new JournalImpl(ActiveMQDefaultConfiguration.getDefaultJournalFileSize(),
                                             2,
                                             0,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java
index 8599524..9d0d4d7 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/PagingTest.java
@@ -16,6 +16,23 @@
  */
 package org.apache.activemq.artemis.tests.integration.client;
 
+import javax.transaction.xa.XAResource;
+import javax.transaction.xa.Xid;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.api.core.ActiveMQExceptionType;
@@ -62,23 +79,6 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
-import javax.transaction.xa.XAResource;
-import javax.transaction.xa.Xid;
-import java.io.File;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
 public class PagingTest extends ActiveMQTestBase
 {
    private ServerLocator locator;
@@ -1734,7 +1734,7 @@ public class PagingTest extends ActiveMQTestBase
                                         2,
                                         0,
                                         0,
-                                        new NIOSequentialFileFactory(server.getConfiguration().getJournalDirectory()),
+                                        new NIOSequentialFileFactory(server.getConfiguration().getJournalLocation()),
                                         "activemq-data",
                                         "amq",
                                         1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java
index 550805e..460c4df 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/RedeliveryConsumerTest.java
@@ -297,7 +297,7 @@ public class RedeliveryConsumerTest extends ActiveMQTestBase
                                             2,
                                             0,
                                             0,
-                                            new NIOSequentialFileFactory(server.getConfiguration().getJournalDirectory()),
+                                            new NIOSequentialFileFactory(server.getConfiguration().getJournalLocation()),
                                             "activemq-data",
                                             "amq",
                                             1);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/43889235/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerAction.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerAction.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerAction.java
index ec551b8..8afe1ce 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerAction.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cluster/NodeManagerAction.java
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.artemis.tests.integration.cluster;
 
+import java.io.File;
+
 import org.apache.activemq.artemis.core.server.NodeManager;
 import org.apache.activemq.artemis.core.server.impl.FileLockNodeManager;
 
@@ -128,7 +130,7 @@ public class NodeManagerAction
 
       }
       NodeManagerAction nodeManagerAction = new NodeManagerAction(work1);
-      FileLockNodeManager nodeManager = new FileLockNodeManager(".", false);
+      FileLockNodeManager nodeManager = new FileLockNodeManager(new File("."), false);
       nodeManager.start();
       try
       {


Mime
View raw message