Login | Register   
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Add Object Cache Monitoring Using JMX and Aspects : Page 4

Find out how to add cache monitoring to your applications using JMX MBeans and AOP technologies—without altering the application code.


advertisement
Technologies and Frameworks
The AOP Cache Monitoring framework layers use several different technologies and open source frameworks. Table 4 lists these frameworks and the application tier in which they are used. Table 4: List of layers and technologies used in the AOPCacheMonitor framework.
Layer Technology
Presentation Spring MVC, JUnit, HttpClient
Application Spring Framework
Domain DAO
Infrastructure JBossCache
Tools JConsole, JBoss 4.0, Hypersonic SQL, Eclipse 3.1, AspectJ, AJDT 1.3

The sample application uses the JConsole tool that comes with the J2SE 5.0 installation as the JMX console for monitoring and management of the object cache and to display runtime JVM details such as heap size, memory usage, thread details, etc. Figure 1 shows the topology diagram for the Cache Monitor application.

 
Figure 1. AOP Cache Monitor Application Architecture Diagram: The diagram shows the topology of the Cache Monitor application.
You can wrap the existing value objects that need to be cached; they become JMX MBeans using introduction advice, which is used to add new attributes and methods to an existing class, thus dynamically providing additional functionality. Using the CacheMonitorAspect class, when an object is inserted in the cache, you save the statistics by triggering JMX notifications that update the cache details in the CacheMonitorMBean class, and display those statistics in a Web console. Several object cache values can add value to application monitoring. The following list shows the statistics that the proposed cache monitoring framework will monitor:

  • hit count
  • miss count
  • cache object life (ms)
  • last access time
  • expiration time
  • list of objects by region name or fully qualified name (FQN)
  • expiration policy (purge algorithm)
  • cache replication time in the cluster


Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap