Skip to content

Instantly share code, notes, and snippets.

@finnjohnsen
Created November 21, 2013 13:34
Show Gist options
  • Save finnjohnsen/7581657 to your computer and use it in GitHub Desktop.
Save finnjohnsen/7581657 to your computer and use it in GitHub Desktop.
Put this in Bootstrap.groovy and Ehcache will be exposed in JMX.
net.sf.ehcache.management.ManagementService.registerMBeans(
grailsApplication.mainContext.getBeansOfType(net.sf.ehcache.CacheManager).values().first(),
grailsApplication.mainContext.getBeansOfType(javax.management.MBeanServer).values().first(),
true, true, true, true)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment