java - Auto-detect tomcat failed start by bash scripts -


i wrote bash script auto-deploy web-application tomcat container whenever triggered. pretty straight-forward:

  1. dump current database back-up
  2. shutdown current tomcat process
  3. delete web-application folder
  4. replace war file new one
  5. 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

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -