• Bug
  • Status: Open
  • 2 Major
  • Resolution:
  • ehcache-server
  • Reporter: apaliwal
  • May 06, 2010
  • 1
  • Watchers: 2
  • June 23, 2010

Description

Steps

Deploy Ehcache Server in Tomcat as per instructions on http://ehcache.org/documentation/cache_server.html

Use jconsole to connect to Tomcat.

Observations

Ehcache MBeans are not visible

Expected Behavior

  1. Ehcache MBeans should be visible

Additional Notes

Upon investigating further, found out that net.sf.ehcache.server.ServerContext, in the contextInitialized() API

the code is

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); managementService = new ManagementService(CacheManager.getInstance(), mBeanServer, true, true, true, true);

This costruct doesn’t register the MBean

When the code updated as follows, the Ehcache MBeans were visible

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer(); managementService = new ManagementService(CacheManager.getInstance(), mBeanServer, true, true, true, true); managementService.init(); // This line was added

BTW, the same is not working for standalone version as well.

Comments

Fiona OShea 2010-05-12

moved to EHC for Greg’s review