General J2EE: Best way to allow web app in tomcat to auto-update
I'm trying to come up with the best way to automatically reload a web application within Tomcat 5.0.x. I'm running the tomcat on Windows XP/2K. Ideally I'd really like to have a program that runs at a scheduled time (probably via the scheduled task) and automatically checks for updates, then downloads them and installs the new app. At that time I think I need to get Tomcat to restart.
- Posted by: Matthew Palmer
- Posted on: March 07 2005 14:37 EST
I'm at somewhat of a loss as to what the best solution is. I'm running tomcat as an NT service (by means of the service.bat file that comes with Tomcat). I'd really like to keep the program running as an NT service. So when I restart it, I'd like it to still be running as an NT service. I'm thinking of switching to using JavaWrapper since I can restart the program from there. I think I can manage this ok, but I'm not sure if it's the best way.
Does anyone have any ideas on how best to do this?
Sorry about the previous post...
Generally, you have to create a cluster of two or more Tomcat servers in order to have it update on the fly (with a third machine as a "loadbalancer" or "router").
You could then bring one down to update it while the other handles the requests and vice-versa.
To implement it requires some work. Here is an example on how it's done:
Hope that helps,