I have several times ran into the same problem, and I would like to have some input on what other people think about the issue: Suppose we have Spring application packaged as a
For data sources; it is a common approach in tomcat context to create a JNDI resource entry and decouple your resource entries/configs from your application. If DB is changed, then you can reconfig your JNDI resource in your container (Tomcat,Jetty etc.) and restart. If you have a container farm, then it won't be a problem to restart your tomcat instances. you can deactivate them on load balancer and restart, reactivate. I think that there is a context file in Jetty also in which you can add JNDI resources. Moreover there is maven profiles for t he properties which depend on different contexts. you can select your profile with "-P" parameter of maven, and your project will be built with these configs, for example for the different target contexts like live and test.