Reputation: 10848
I wrote a bash script to auto-deploy a web-application to tomcat container whenever it is triggered. It is pretty straight-forward:
However, now I want to have a fall-back. If there's some problem in start-up process, the database will get restored and the old war file is deployed again.
My problem is that I don't know when a web-application failed to start. One of my implementation is that I will check the size of the logging file of my web application, if after a while it doesn't increase (which means there's nothing get written), then the system should understand that deployment is failed and we should restore the old web-application. However, this is kind of dirty and I'm not sure what will happen if my logging file get rolled right at that time.
Does tomcat has any mechanism to support start-failed detection of a web-application?
Upvotes: 2
Views: 487