--- projects/cms/source/server/uk/org/iscream/cms/server/core/ConfigurationManagerServant.java 2001/03/01 20:22:21 1.12 +++ projects/cms/source/server/uk/org/iscream/cms/server/core/ConfigurationManagerServant.java 2001/03/01 21:06:58 1.13 @@ -24,7 +24,7 @@ import java.io.*; * ### * * @author $Author: tdb $ - * @version $Id: ConfigurationManagerServant.java,v 1.12 2001/03/01 20:22:21 tdb Exp $ + * @version $Id: ConfigurationManagerServant.java,v 1.13 2001/03/01 21:06:58 tdb Exp $ */ class ConfigurationManagerServant extends ConfigurationManagerPOA { @@ -33,7 +33,7 @@ class ConfigurationManagerServant extends Configuratio /** * The current CVS revision of this class */ - public final String REVISION = "$Revision: 1.12 $"; + public final String REVISION = "$Revision: 1.13 $"; //---STATIC METHODS--- @@ -123,7 +123,7 @@ class ConfigurationManagerServant extends Configuratio } } // add the system config as the final check - fileList += _systemConfigFile + ";"; + fileList = _systemConfigFile + ";" + fileList; _logger.write(toString(), Logger.DEBUG, "config tree - " + fileList); // build the configuration @@ -315,20 +315,17 @@ class ConfigurationManagerServant extends Configuratio // some holders for variables File currentFile; - long lastModified, newLastModified; + long lastModified, newLastModified = 0; Properties properties, prevProperties; // the root of all configurations will be the system config // so we need to open the properties of that Properties defaultProperties = new Properties(); - currentFile = new File(_configPath, _systemConfigFile); - lastModified = currentFile.lastModified(); - defaultProperties.load(new FileInputStream(currentFile)); // This loop then iterates over the file list // creates the properties to be passed to the // Configuration constructor - do { + while (st.hasMoreTokens()) { properties = new Properties(defaultProperties); currentFile = new File(_configPath, st.nextToken()); newLastModified = currentFile.lastModified(); @@ -337,13 +334,13 @@ class ConfigurationManagerServant extends Configuratio } properties.load(new FileInputStream(currentFile)); defaultProperties = properties; - } while (st.hasMoreTokens()); + } // this creates the configuration, all nice, ready to be returned ConfigurationServant ref = new ConfigurationServant(properties, fileList, lastModified); org.omg.CORBA.Object objRef = _refman.getRootPOA().servant_to_reference(ref); config = ConfigurationHelper.narrow(objRef); - + _logger.write(toString(), Logger.DEBUG, "returning built configuration"); } catch (Exception e) { // not sure what to do here // so we just log the error