开发者

JMX: How to retrieve/detect exceptions thrown from my application that is monitored

I am trying to use JMX to monitor the status of my application, in partic开发者_如何学Pythonular to track any exceptions that are thrown during my application's runtime.

However, I cannot seem to find any existing APIs that can retrieve the exceptions thrown. I went as far as getting a thread's stacktrace but there ain't any exception info captured. Anyone has any idea?

Thanks.


I like to use trends up counters (invocations count & exceptions count) that my monitoring tool (e.g. the open source Hyperic HQ) converts in "per minute counters".

Thanks to this, I have an "exceptions per minute" per minute counter on which I can trigger alerts in case of problems (e.g. "more than 10 exceptions per minute").

We developed a @Profiled annotation which does this counting job as well as measuring the time spent in the invocations and the active number of invocations.

This @profiled annotation is packaged with many other JMX extras to ease monitoring of common components (dbcp, util.concurrent, cxf, jms, etc) and proposed under a business friendly Apache Software License at http://code.google.com/p/xebia-france/wiki/XebiaManagementExtras .

Hope this helps,

Cyrille (Xebia)


Try using JMX notifications. You have a great tutorial here

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜