We are writing a JSF web app + some session beans. The jars and wars are packaged inside an ear file.
In this application, they are some configuration parameters that will perhaps change in the future, as directories locations, mail addresses, etc, ...
I do not want to hard-code theses values. I want to put them in a property file or something like that, but outside the ear file, in order to avoid rebuild it in case of change. Is it the good approach ? Are they any other options ?
We are using glassfish.
If you move resources outside your application, it could be very hard to maintain in future.
Other approaches -
1. DB is a very good option.
2. If you dont want to go with DB, write a thread which will reload your properties from your configuration file every n seconds.
3. You can set your configuration details as custom properties on your server container.