Thanks for the reply Ben!
Well,actually I'm working on similar lines by designing a portable(and hence Java coded) watchdog which would ping a component of the web app running on tomcat at regular intervals.
The inherent complexity of the problem lies in the fact that in case the response received is not as expected/erroneous, we need to figure out what the error could be attributed to
1> Tomcat not running
2> Tomcat process running,but with few threads (may be the TCP connection listener
thread 8080)not running
3> The web application is not running
4> The web application is in an inconsistent state
1> Could be easily detected by checking the existence of the tomcat server process,but detecting 2> could be tricky.
Again 3> and 4> are equivalent from an application control perspective,as in both the cases,the web app needs to be restarted.
So that requires putting some thoughts on how to detect 2>. This is important because the watchdog should not be led to interpret that Tomcat is running fine just because the corresponding process is running,and therefore proceed to restart the webapp,instead of restarting the Tomcat.
-Any thoughts/comments would be highly appreciated!
[ July 25, 2008: Message edited by: Ajay Saxena ]