Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul,

Paul Singleton wrote:
I want to deploy the same war into different (5.5)
Services (e.g. "test" and "live"), and want it to
discover where it is and behave differently.

Is there a Tomcat-specific way to do this?

Is there a container-independent way of discovering
container-specific info like this?

You tell us: how can /you/ tell that you are in production versus test?

If you can make that determination, then you should be able to make your
software do it, too.

I have ant scripts that build everything for me including WAR files for
deployment. In my source repo, I have different configuration
directories for each of dev, demo, and prod. In fact, I can make as many
of those as I'd like, since I just set "release-type" in my
build.properties file to a string, and ant pulls the configuration and
properties files that match that directory, so I could potentially
create a "foo" release-type if I wanted.

So, instead of the application detecting where it is and configuring
itself appropriately, I tell the application what it /will be/ and
configure it at build time.

Yeah, so do we, but like I said:

>> I want to deploy the same war into different (5.5)
>> Services (e.g. "test" and "live"), and want it to
>> discover where it is and behave differently.

I didn't explain *why* we want to do this, because I
don't want to spend time debating it with folk who
prefer to do it the other way ;-)

But here are a couple of plus points for discovery
and self-configuration (DSC):

1) our dev, test and demo configurations behave in
convenient ways we don't *ever* want in our live
apps; with DSC we are more confident that, even if
deployment misteaks are made, we won't be embarrassed

2) we can implement all configuration in Java and
don't need to learn or teach anything else!

regards - Paul


Just my $0.02
- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF//kT9CaO5/Lv0PARAgJZAJ4r2l8nkM/fbQWl62nTeR1TsKgQOACfYIXr
wWE/VnGrYVqHxl5mUpbPt1U=
=qyrv
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Paul Singleton
Jambusters Ltd

tel: 01782 750821
fax: 08707 628609
VAT: 777 3904 85
Company no. 04150146


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to