Make location of db.properties customizable using the dbPropFile server property.
Contributed by Bernhard Fröhlich. Fixes bug 640 <http://helma.org/bugs/show_bug.cgi?id=640>
This commit is contained in:
parent
ac28cd7542
commit
fb12fd3e4d
1 changed files with 9 additions and 2 deletions
|
@ -435,14 +435,21 @@ public class Server implements Runnable {
|
|||
|
||||
|
||||
// read db.properties file in helma home directory
|
||||
String dbPropfile = sysProps.getProperty("dbPropFile");
|
||||
File file;
|
||||
if ((dbPropfile != null) && !"".equals(dbPropfile.trim())) {
|
||||
file = new File(dbPropfile);
|
||||
} else {
|
||||
file = new File(hopHome, "db.properties");
|
||||
}
|
||||
|
||||
dbProps = new ResourceProperties();
|
||||
dbProps.setIgnoreCase(false);
|
||||
dbProps.addResource(new FileResource(new File(hopHome, "db.properties")));
|
||||
dbProps.addResource(new FileResource(file));
|
||||
DbSource.setDefaultProps(dbProps);
|
||||
|
||||
// read apps.properties file
|
||||
String appsPropfile = sysProps.getProperty("appsPropFile");
|
||||
File file;
|
||||
if ((appsPropfile != null) && !"".equals(appsPropfile.trim())) {
|
||||
file = new File(appsPropfile);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue