Patch from Andreas Bolka to use appHome and dbHome properties

This commit is contained in:
hns 2003-07-23 09:19:58 +00:00
parent 260cca8971
commit 83378773e9
2 changed files with 19 additions and 6 deletions

View file

@ -199,13 +199,11 @@ public final class Application implements IPathElement, Runnable {
// if appDir and dbDir weren't explicitely passed, use the
// standard subdirectories of the Hop home directory
if (appDir == null) {
appDir = new File(home, "apps");
appDir = new File(appDir, name);
appDir = new File(server.getAppsHome(), name);
}
if (dbDir == null) {
dbDir = new File(home, "db");
dbDir = new File(dbDir, name);
dbDir = new File(server.getDbHome(), name);
}
// get system-wide properties

View file

@ -673,15 +673,30 @@ public class Server implements IPathElement, Runnable {
* @return ...
*/
public File getAppsHome() {
String appHome = sysProps.getProperty("appHome");
String appHome = sysProps.getProperty("appHome", "");
if ((appHome != null) && !"".equals(appHome.trim())) {
if (appHome.trim().length() != 0) {
return new File(appHome);
} else {
return new File(hopHome, "apps");
}
}
/**
*
*
* @return ...
*/
public File getDbHome() {
String dbHome = sysProps.getProperty("dbHome", "");
if (dbHome.trim().length() != 0) {
return new File(dbHome);
} else {
return new File(hopHome, "db");
}
}
/**
*
*