tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <...@pidster.com>
Subject Re: Installing auto updates for my webapp hosted on Tomcat
Date Wed, 21 Apr 2010 07:28:08 GMT
On 21/04/2010 00:26, Anand HS wrote:
> Hi,
> I have a webapplication deployed in tomcat and have been asked to develop an
> auto updater that can grab a new update and apply the updates to my webapp.
> I want to ask the community to see if there are 'hooks' tomcat provides to
> achieve this.

No hooks.

> In essence here is what Im expecting to achieve -
> 
> 1. A simple agent ( can be a java program inside my web app itself ) senses
> there is an update.

OK so far.

> 2. when an update is available, it stops the tomcat server.

Possible, but somewhat unwise.  You can update a webapp without
restarting Tomcat.

> 3. Applies the update ( similar to redeploy along with configuration file
> changes ) .

Not too complicated to replace a file, if you have a program running.

> 4. restarts the tomcat.

If the agent runs inside webapp (or Tomcat), then it's not running at
this point so it can't restart Tomcat.

> Some of the ideas Im after are -
> 
> 1. Deploy my updater agent outside of tomcat and hence it can stop and start
> the tomcat servers.

If you want to restart the servers themselves, the agent will need to be
running outside the container, yes.

> 2. Have the updater agent as part of my webapp itself and with the help of
> Tomcat API ( ? ) , restart the application.

What would such an API do?


p

> I need advice from the community on other approaches as well as any support
> tomcat provides out of the box.
> 
> Thanks,
> Anand
> 



Mime
View raw message