[jbosscache-commits] JBoss Cache SVN: r7389 - core/trunk/src/main/java/org/jboss/cache/loader.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Wed Jan 7 12:50:28 EST 2009


Author: mircea.markus
Date: 2009-01-07 12:50:28 -0500 (Wed, 07 Jan 2009)
New Revision: 7389

Modified:
   core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
Log:
fix: only build the root once on loader start, so that location cab be modified before cache is started

Modified: core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java	2009-01-07 17:46:39 UTC (rev 7388)
+++ core/trunk/src/main/java/org/jboss/cache/loader/FileCacheLoader.java	2009-01-07 17:50:28 UTC (rev 7389)
@@ -126,13 +126,6 @@
       {
          this.config = new FileCacheLoaderConfig(base);
       }
-
-      String location = this.config != null ? this.config.getLocation() : null;
-      if (location != null && location.length() > 0)
-      {
-         root = new File(location);
-         rootPath = root.getAbsolutePath() + File.separator;
-      }
    }
 
    public IndividualCacheLoaderConfig getConfig()
@@ -144,6 +137,12 @@
    public void create() throws Exception
    {
       lock.acquireLock(Fqn.ROOT, true);
+      String location = this.config != null ? this.config.getLocation() : null;
+      if (location != null && location.length() > 0)
+      {
+         root = new File(location);
+         rootPath = root.getAbsolutePath() + File.separator;
+      }
       try
       {
          if (root == null)




More information about the jbosscache-commits mailing list