tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruslan Gainutdinov <>
Subject Re: Best practice to upgrade (redeploy) .war files
Date Mon, 06 Sep 2010 20:24:31 GMT
You can create ant task to handle this.
We do it this way.

1. We have cluster on apache2.2 using mod_jk
2. All sessions are sticky but nofailover=off means can migrate to
another server
3. Via jkmanager I disable (activation stopped) 2 out of 3 cluster nodes.
4. Wait for any AJP/HTTP thread activity to finish on this nodes
5. Every cluster node have separate webapps folder, e.g. webapps.NODE1
6. Copy war into webapps.NODE1, webapps.NODE2 folders
7. Wait for NODE1 and NODE2 to redeploy app and sessions synchronized.
8. Change activation for NODE1, NODE2 to online, NODE3 to stopped
9. Same as 4. for NODE3
10. Same as 6. for NODE3
11. Same as 7. for NODE3
12. Change activation for NODE3 to online

Looks complicated but actually it is 5 minutes per one apache.
Doing manually, haven`t found time to script it.
For jkmanager scripting - you can use connectors ant task
For 4. you can use jmx as suggested in older article

This way you do seamless migration. But your sessions must be thin
and not contain complex objects (no cache, no connections to db, etc).
Or you must be prepared to recreate them on next request.

p.s. Don`t use FarmWarDeployer - it is not reliable. Can`t handle
offline nodes when they become online,
and gets confused when war to deploy already in the temp folder.

With kindest personal regards,
Ruslan Gainutdinov

On Fri, Sep 3, 2010 at 12:20 PM, Domenico Briganti <> wrote:
> Il giorno ven, 03/09/2010 alle 08.53 +0200, Rainer Frey ha scritto:
>> How
>> do you actually upgrade deployed applications?
> There is a recent thread on this topic, see
> If you need service continuity, you have to use at least 2 Tomcat
> instances
> Regards,
> Domenico
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message