Say goodbye to scattered and tangled monitoring code, as Ron Bodkin shows you how to combine AspectJ and JMX for a flexible, modular approach to performance monitoring. In this first of two parts, Ron uses source code and ideas from the Glassbox Inspector open source project to help you build a monitoring system that provides correlated information to identify specific problems, but with low enough overhead to be used in production environments.
The article gets into some serious code, and discusses:
- An aspect for capturing time and counts of servlets
- Managing overhead
- Thread safety
- Exposing performance data
- Exposing beans for JMX management
- Database request monitoring
- Servlet request tracking
- JDBC monitoring
- Tracking JDBC information
Not only is this a great example of seeing *real* AOP at work, but it also let’s us see the work being done in Glassbox, which wil hopefully end up with us being able to find problems in our software a LOT faster!