Forums Register Login

Read configuration from database instead of a config file

+Pie Number of slices to send: Send
Hi Friends,

I have been working on stand alone application that reads application configuration from properties files.

I was thinking if it would be a better idea to store them in a table in the database.

This way, changes would be propagated faster
if we need to update a particular property, we don't necessarily have to go through the whole release cycle.

But this could be a disadvantage as well, as we are introducing un-tested features.

But these configuration changes do not happen often and if ever it happens we would actully know the risks.

What are your thoughts and experiences on this?

I would appreciate if someone throws some light on this.

Thanks,
Cnu
[EDIT] fixed subject to be more meaningful ( I think )
[ September 28, 2006: Message edited by: cnu sri ]
+Pie Number of slices to send: Send
I introduced a configuration database table for just the reasons you describe, plus one more. Our deployment people want to deploy an EAR file and nothing else. So the config files must be in the EAR and since we cannot modify the EAR that makes them the same in all environments: test, qa, s&p, training, prod, etc. We have quite a few things that must vary in each environment, so those go in the database. It's set up so a configuration file overrides the database. That lets a developer customize his own environment through files without changing a shared database. The configuration module has a lazy cache to improve performance and an administrative dashboard to clear cache and bring in changes.

Any of that sound good?
+Pie Number of slices to send: Send
Stan,

Thanks very much. Yes, that definitely feels more assuring. Specially the idea of overriging the default properties with a config is very cool.

Thanks,
Cnu
Stinging nettles are edible. But I really want to see you try to eat this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1482 times.
Similar Threads
Eclipse, Run/Debug configuration name suffix with project name.
Configuration of an application in JBoss Xml File
Local webapp users
How do I know when I require synchronized access to cached data?
Repository conversion to Subversion.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:19:26.