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

Jeffrey,

On 2/16/12 4:12 PM, Jeffrey Janner wrote:
> I host an app for a couple of dozen customers.  Naturally, upgrade 
> time can be a bit of a pain, and I'd like to simplify things. 
> Assuming that all the customer-specific information (DB connection 
> info, logger info, etc.) can be described as resources in the 
> context.xml file, would it be possible to put the actual webapp in
> a single pre-exploded directory without causing Tomcat fits?

[snip]

> Then when a new release comes out, I can deploy the web-app once
> and modify the individual customer's contexts to point to the new
> release path as they choose upgrade (or all at once).

When you say "deploy the web-app once" you aren't really talking about
deploying it: what you mean is just throwing it up on the server on
the disk some place. A "deployment" is really when the context gets
launched and it available to clients.

I don't see any reason why you couldn't do this. I agree with Pid that
you shouldn't explode the WAR file: there's no reason to do that
unless you have buggy code that doesn't fetch resources properly. I
think it would be as easy as this:

1. Get the WAR file into a new place:

$ cp my-new-version.war \
  /path/to/non-auto-deploy-webapps/

2. For each webapp you want to upgrade:
$ echo ",s/my-old-version\.war/my-new-version\.war/g" \
  | ed $CATALINA_BASE/conf/Catalina/[hostname]/webapp.xml

If you have auto-deploy enabled, I believe this will cause Tomcat to
reload the context. If not, you may have to use the manager to either
re-load the context or re-deploy.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8+c/MACgkQ9CaO5/Lv0PAPWgCgn2uSU4Kw+9jVk5i3wsbf2y0d
4GQAniVwmmKlqVbUIXtRBwNvQJk+VvHA
=CO5N
-----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