Re: Question: Best practice for switching db connections as build time
Re: Question: Best practice for switching db connections as build time
- Subject: Re: Question: Best practice for switching db connections as build time
- From: Chuck Hill <email@hidden>
- Date: Fri, 31 Oct 2008 11:57:55 -0700
On Oct 24, 2008, at 7:17 AM, William Sandner wrote:
We have 4 different environments that we deploy to, development,
test, staging, and production. We are using ant as our build tool.
For most of our environments we connect to a localhost database with
a common password, but production is on an external server which has
a more secure password. What is the best way to change the db
connection at build time?
Example:
When I build for production, I want to make sure the connection is
pointing to the correct server and the password is correct.
I know I can use ant to search and replace for connection string
tokens in the Properties file, but is this the easiest way?
I'd say the best way is to NOT do this at build time. Set the runtime
properties in JavaMonitor (or whatever you use for deployment). If
you do want to do it at build time, then Ant's search and replace is
probably the best way.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden