Kevin Tung wrote:

How does everyone manage different deployment configurations?

Let's say your webapp needs to run in various environments.. for example
dev, staging and production.  Each environment has its own database
connection info and third party SOAP endpoints.. etc.

What is a good way to automate (at least partly) the management of these
configurations so that..

* The process of promoting code from dev to staging/production will trigger
a correct change of configuration info.
* The configuration info can be stored in a code repository for history
logging and accountability.

I've been doing this mostly manually, but there has to be a better way..  I
would love to hear about your approaches.

Kevin


One thing you should strive to do is minimize the configuration differences between the environments. A very helpful approach is to use JNDI resources to encapsulate the things that are different (such as what database your connection pool should connect to). This allows the application itself to be deployed with no changes inside the WAR -- you just need to set things up to configure the resources themselves for each of the different server environments. In a similar way, you could use things like <env-entry> Strings to configure the URLs of your SOAP endpoints via JNDI, and gain the same benefits.

The mechanisms for actually configuring the JNDI resources visible to a webapp vary by app server -- here's the instructions for Tomcat to give you a sense of what's possible:

http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html

In Tomcat, you can also configure the resources behind these references in the admin webapp.

Craig



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to