title: JMX: How to retrieve/detect exceptions thrown from my application that is monitored
body: <p>I am trying to use JMX to monitor the status of my application, in particular to track any exceptions that are thrown during my application's runtime.</p>
  
  <p>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?</p>
  
  <p>Thanks.</p>