Spring has the nice mechanism PropertyPlaceholderConfigurer for injecting values like timeouts, JDBC Urls and so forth into Spring beans for configuration purposes. Is there a sensible way to handle configuration values that can change at runtime?
UPDATE: With Spring 3.1 there is a nice way to include non-static configuration sources such as the database via PropertySources. Some ApplicationContexts provide a refresh mechanism that is in principle able to handle changing configuration values. However it stops the application first, then creates all beans fresh and then starts the application context again. However, for our purposes I would need a way to do this transparently, such that the server correctly handles currently running requests.
Another idea to do this would be a custom Scope that creates fresh objects when the configuration changes. Unfortunately the ObjectFactory provided to the Scope uses a preprocessed bean definition, such that the placeholders are not read anew from the configuration. Thus the created objects have the same configuration. :-(