1 Reply Latest reply on Feb 27, 2008 3:36 AM by frankthetank

    EHCACHE Mbean on Jboss

    ozguy

      Hi

      I am using Ehcache for one of my applications which is deployed on the Jboss.

      Ehcache has a Mbean which can be used with JMX to monitor the cache. Is there anyone who is able to see Ehcache Mbean on the JMX console.

      here is what i am doing to register the cache with the Jboss

      cacheManager = CacheManager.create(getClass().getResourceAsStream(this.configLocation));


      MBeanServer mbeanServer = ManagementFactory.getPlatformMBeanServer();
      ManagementService.registerMBeans(this.cacheManager,mbeanServer,false,false,false,true);




        • 1. Re: EHCACHE Mbean on Jboss
          frankthetank

          I walked into that one twice as well.
          It is there, you just cannot see it.

          If you use the ManagementFactory.getPlatformMBeanServer() method it will return something like your own private domain.

          Use this call instead:

          MBeanServerFactory.findMBeanServer(null).get(0);