From: David A. <web...@av...> - 2010-02-26 16:00:49
|
You are right, sort of. Actually, that is the case as long as you don't do something really weird like I was. The Properties.<userName> file in an Application that links to an optionalConfigurationFile in the Application's Resources directory, then the Properties.<userName> takes precedence. BUT If you have a Properties.<username> in a _Framework_ that links to an optionalConfigurationFile that resides in the _Application's_ Resources directory, then the optionalConfigurationFile takes precedence. See, you just have to think like me. Dave On Feb 26, 2010, at 10:04 AM, Mike Schrag wrote: > doesn't make sense: > > /* WebObjects.properties in the user home directory */ > String userHome = ERXSystem.getProperty("user.home"); > > /* Optional properties files */ > if (optionalConfigurationFiles() != null && optionalConfigurationFiles().count() > 0) { > ... > } > > /** /etc/WebObjects/AppName/Properties -- per-Application-per-Machine properties */ > String applicationMachinePropertiesPath = ERXProperties.applicationMachinePropertiesPath("Properties"); > addIfPresent("Application-Machine Properties", applicationMachinePropertiesPath, propertiesPaths, projectsInfo); > > /** Properties.<userName> -- per-Application-per-User properties */ > String applicationDeveloperPropertiesPath = ERXProperties.applicationDeveloperProperties(); > addIfPresent("Application-Developer Properties", applicationDeveloperPropertiesPath, propertiesPaths, projectsInfo); > > /** Properties.<userName> -- per-Application-per-User properties */ > String applicationUserPropertiesPath = ERXProperties.applicationUserProperties(); > addIfPresent("Application-User Properties", applicationUserPropertiesPath, propertiesPaths, projectsInfo); > > On Feb 26, 2010, at 10:00 AM, David Avendasora wrote: > >> It appears that: >> >> 1) You can put DB connection dictionary info in the OptionalConfigurationFiles without any extra code in the Application class. >> 2) They take ultimate precedence over any of the other property files, even over the Properties.username file. >> >> Dave >> >> On Feb 25, 2010, at 11:45 AM, David Avendasora wrote: >> >>> I was hoping someone just might know off the top of their head. Oh well. I'll test it and get back. >>> >>> Dave >>> >>> On Feb 25, 2010, at 11:41 AM, Mike Schrag wrote: >>> >>>> it's faster to try it and tell us than to look at the code ... >>>> >>>> On Feb 25, 2010, at 11:34 AM, David Avendasora wrote: >>>> >>>>> Hi all, >>>>> >>>>> I have a very specific properties loading question: >>>>> >>>>> We are using the Properties.Username convention, and launching our application in Production using a username of Production. Included in the Properties.Production file is a link to another Property file that contains information we cannot store in SVN (DB Passwords and other sensitive info) using: >>>>> >>>>> er.extensions.ERXProperties.OptionalConfigurationFiles = (/path/to/PROD/DBPasswordsFile) >>>>> >>>>> My question is, will the properties set in that Optional Configuration File override the ones in Properties.Production? Is it dependent upon where in the property file the link is? >>>>> >>>>> Thanks! >>>>> >>>>> Dave >>>>> ------------------------------------------------------------------------------ >>>>> Download Intel® Parallel Studio Eval >>>>> Try the new software tools for yourself. Speed compiling, find bugs >>>>> proactively, and fine-tune applications for parallel performance. >>>>> See why Intel Parallel Studio got high marks during beta. >>>>> http://p.sf.net/sfu/intel-sw-dev_______________________________________________ >>>>> Wonder-disc mailing list >>>>> Won...@li... >>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >>>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev_______________________________________________ >>> Wonder-disc mailing list >>> Won...@li... >>> https://lists.sourceforge.net/lists/listinfo/wonder-disc >> >> ------------------------------------------------------------------------------ >> Download Intel® Parallel Studio Eval >> Try the new software tools for yourself. Speed compiling, find bugs >> proactively, and fine-tune applications for parallel performance. >> See why Intel Parallel Studio got high marks during beta. >> http://p.sf.net/sfu/intel-sw-dev_______________________________________________ >> Wonder-disc mailing list >> Won...@li... >> https://lists.sourceforge.net/lists/listinfo/wonder-disc > |