java - Auto-detect tomcat failed start by bash scripts -
i wrote bash script auto-deploy web-application tomcat container whenever triggered. pretty straight-forward:
- dump current database back-up
- shutdown current tomcat process
- delete web-application folder
- replace war file new one
- start tomcat again
however, want have fall-back. if there's problem in start-up process, database restored , old war file deployed again.
my problem don't know when web-application failed start. 1 of implementation check size of logging file of web application, if after while doesn't increase (which means there's nothing written), system should understand deployment failed , should restore old web-application. however, kind of dirty , i'm not sure happen if logging file rolled right @ time.
does tomcat has mechanism support start-failed detection of web-application?
have looked @ manager ships tomcat? gives api determine status of web apps deployed inside it.
Comments
Post a Comment