Thursday, October 1, 2009

Configuring spring application from a database

I need to move a  spring based application configuration from a property file  to a database. It is a headless, server application.

The reason I would like make the move  is

·         It is much easier to build a web application to manage the configuration.

·         Add support for dynamic configuration. Today the application needs to restart when a configuration change is made.

Using databaseconfiguration as described in the this example seems to be the way to go.

This solves the static configuration management. How does one handle changes to the configuration without having to restart the application?  I have some ideas, but it would be interesting to see if anyone has solved it.

I would have to

·         let the beans register to listen for configuration changes,

·         Frequently poll the database for changes to the configuration,

·         Notify bean listeners of the change and

·         Let the beans handle the change

Posted via email from dineshbhat's posterous

blog comments powered by Disqus