-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alec,

On 9/14/2010 5:04 PM, Alec Swan wrote:
> I have a WAR file which I distribute to multiple servers with multiple
> virtual hosts. On each server I have a database, which is accessed by all
> virtual host apps on this server.

I'm interested: is the WAR actually identical, including all settings
for all virtual hosts? If so, you can save yourself a lot of memory and
database connections by deploying a single copy to a single <Host> and
either setting that host as the "defaultHost" for the <Service> or using
<Aliases> within the <Host>.

> Is it the right approach to put database access credentials in
> $TOMCAT/conf/context.xml

No. You shouldn't really modify conf/context.xml unless you have a
really really good reason to do so.

> which will then be loaded by each virtual host app
> or should I put them somewhere else?

Put the <Resource> for your database connection pool into your webapp's
META-INF/context.xml file.

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

iEYEARECAAYFAkyP5psACgkQ9CaO5/Lv0PAjswCeJnaG3E5zW3thH5e+l6e9seES
b2IAn3qmhJbwiUtPfsX7tIGQiotuvTm/
=eqpa
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to