开发者

Can Tomcat be configured to fail to start if a webapp fails to start?

开发者 https://www.devze.com 2022-12-08 06:39 出处:网络
I\'d like to configure Tomcat 5.5 to fail to start if any of its 开发者_Python百科webapps fail to start. Is that possible? I can\'t find any configuration element in the documentation that suggestions

I'd like to configure Tomcat 5.5 to fail to start if any of its 开发者_Python百科webapps fail to start. Is that possible? I can't find any configuration element in the documentation that suggestions that this can be done.


If you have no security manager running, you can simply call System.exit(0) on failure. The shutdown handler will perform an orderly shutdown.


I suspect there's no way to do it with a configuration setting. Tomcat is started with a script. Extend the script to check whether your site is up, and then stop tomcat if it isn't.


At least in 7.0.47 and later this works: https://gist.github.com/xkr47/9088839

0

精彩评论

暂无评论...
验证码 换一张
取 消