--- source-trees/wsrf-cvs/wsrf/java/core/source/src/org/globus/wsrf/utils/FilePersistenceHelper.java 27 Jun 2005 04:43:34 -0000 1.7.2.2 +++ source-trees/wsrf-cvs/wsrf/java/core/source/src/org/globus/wsrf/utils/FilePersistenceHelper.java 14 Sep 2005 21:13:34 -0000 1.7.2.3 @@ -20,7 +20,6 @@ import org.apache.commons.logging.LogFactory; import org.globus.wsrf.Constants; -import org.globus.wsrf.container.ServiceHost; import org.globus.wsrf.ResourceException; import org.globus.wsrf.ResourceKey; import org.globus.wsrf.config.ContainerConfig; @@ -39,8 +38,10 @@ ContainerConfig.CONTAINER_ID_PROPERTY; private static final String FILE_PERSISTENCE_DIR = - System.getProperty("user.home") + File.separatorChar + - ".globus" + File.separatorChar + "persisted"; + getPersistenceDirectory(); + + private static final String PERSISTENCE_DIR_PROPERTY = + Constants.CONTAINER_PROPERTY + ".persistence.dir"; private static Log logger = LogFactory.getLog(FilePersistenceHelper.class.getName()); @@ -53,6 +54,14 @@ return ContainerConfig.getContainerID(); } + private static String getPersistenceDirectory() { + String value = System.getProperty(PERSISTENCE_DIR_PROPERTY); + return (value == null) + ? System.getProperty("user.home") + File.separatorChar + + ".globus" + File.separatorChar + "persisted" + : value; + } + public static String getDefaultStorageDir(Class beanClass) throws IOException { if (beanClass == null) {