3 Replies Latest reply on Jul 30, 2009 3:47 PM by oneworld95

    Which file is used for global, static settings?

    oneworld95
      Which properties file should we use to access such things as email addresses that might change over time? Seam comes with the seam.properties messages_en.properties. Can I create a custom file for my app's settings that I'd like to fetch and use? How would you access such a custom properties file? Thank you.
        • 1. Re: Which file is used for global, static settings?

          Well, if the list is large, storing it in the database might be the best option (it is also a good idea because you will be able to alter it without messing with the application files and possible triggering an unwanted application restart)


          But, if it is something more like a configuration setting then you can use the components.xml file to configure the properties of a bean, I use that for custom configuration settings.


          Another option, if you are using the Spring/Seam integration is to use applicationContext.xml

          • 2. Re: Which file is used for global, static settings?
            asookazian

            We use a foo.properties file which is placed in %JBOSS_HOME%\server\xxx\conf which can be changed for different envmts (dev, QA, UAT, etc.)


            and we also use db tables (this is the best option, the changes don't require a server restart)

            • 3. Re: Which file is used for global, static settings?
              oneworld95

              Thanks. Assuming that the file is called custom.properties, and it has a property called the following


              new_employee.emailtoaddress=address@somedomain.com



              Do you reference and read it this way?


              #{custom['new_employee.emailtoaddress']}



              Do you need to instantiate anything or can you simply reference it using expression language? Thanks.