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.
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?
-
Best way to allow web app in tomcat to auto-update (2 messages)
- Posted by: Matthew Palmer
- Posted on: March 07 2005 14:37 EST
Threaded Messages (2)
- , by Matan Amir on March 13 2005 12:20 EST
- Sorry about that... by Matan Amir on March 13 2005 12:24 EST
-
,[ Go to top ]
- Posted by: Matan Amir
- Posted on: March 13 2005 12:20 EST
- in response to Matthew Palmer
Hi Matthew -
Sorry about that...[ Go to top ]
- Posted by: Matan Amir
- Posted on: March 13 2005 12:24 EST
- in response to Matan Amir
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:
http://www.javaworld.com/javaworld/jw-12-2004/jw-1220-tomcat.html
Hope that helps,
Matan