开发者

Use JMX to get is Tomcat started completely

开发者 https://www.devze.com 2023-02-08 10:27 出处:网络
Have script that monitor Tomcat and initiate restart when some conditions passed. Need to check that number and state of running tomcat contexts after restart is the same as was before restart.

Have script that monitor Tomcat and initiate restart when some conditions passed. Need to check that number and state of running tomcat contexts after restart is the same as was before restart. Is there any possibility to use JMX Mbean Attribute which indicate that Tomcat startup process finished completely (finished startup of all deployed contexts and catalina.out contain "INFO: Server startup in 234277 ms" )? Of course I can monitor log file for this "Server startup message", but I use JMX to poll all necessary stats and would like to have this part also monitored through JMX. For JMX polling 开发者_如何学JAVAI use modified version of command line jmx client http://crawler.archive.org/cmdline-jmxclient/


I don't think Tomcat (5,6, dunno about 7) exposes such an attribute as of now.

Implementing that would not be hard I think, so If you need that, get the source, implement it and then provide a patch to the ASF, so that newer versions may get that out of the box.

0

精彩评论

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

关注公众号