Author: vhalbert(a)redhat.com
Date: 2009-04-23 17:53:29 -0400 (Thu, 23 Apr 2009)
New Revision: 838
Modified:
trunk/server/src/main/java/com/metamatrix/platform/config/util/CurrentConfigHelper.java
Log:
Teiid-464 - to support shared installation, need the ability to override the default
property file to load instead of teiid.properties
Modified:
trunk/server/src/main/java/com/metamatrix/platform/config/util/CurrentConfigHelper.java
===================================================================
---
trunk/server/src/main/java/com/metamatrix/platform/config/util/CurrentConfigHelper.java 2009-04-23
21:26:48 UTC (rev 837)
+++
trunk/server/src/main/java/com/metamatrix/platform/config/util/CurrentConfigHelper.java 2009-04-23
21:53:29 UTC (rev 838)
@@ -25,6 +25,7 @@
package com.metamatrix.platform.config.util;
import java.io.File;
+import java.io.FileInputStream;
import java.io.InputStream;
import java.util.Properties;
@@ -45,13 +46,17 @@
public class CurrentConfigHelper {
public void loadMetaMatrixPropertiesIntoSystem() throws Exception {
- loadMetaMatrixPropertiesIntoSystem("metamatrix.properties"); //$NON-NLS-1$
+ loadMetaMatrixPropertiesIntoSystem(CurrentConfiguration.BOOTSTRAP_FILE_NAME);
//$NON-NLS-1$
}
public void loadMetaMatrixPropertiesIntoSystem(String filename) throws Exception {
Properties bootstrapProps = new Properties();
InputStream bootstrapPropStream =
this.getClass().getClassLoader().getResourceAsStream(filename);
+ if (bootstrapPropStream == null) {
+ bootstrapPropStream = new FileInputStream(new File(filename));
+
+ }
bootstrapProps.load(bootstrapPropStream);
bootstrapProps.remove(CurrentConfiguration.CONFIGURATION_READER_CLASS_PROPERTY_NAME);
Show replies by date