-
1. Re: How to get cache size programmatically
galder.zamarreno Jul 14, 2009 12:12 PM (in response to somboss)You can such information via CacheJmxWrapperMBean. See http://www.jboss.org/index.html?module=bb&op=viewtopic&t=156458&postdays=0&postorder=asc&start=10 for more information on how you can get hold of that interface.
Are you running within an application server or standalone? -
2. Re: How to get cache size programmatically
galder.zamarreno Jul 14, 2009 12:15 PM (in response to somboss)Even if running standalone, you can get hold of that interface programmatically following steps in http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.1.0.GA/userguide_en/html_single/index.html#jmx.registration
Remember that from JDK5 onwards, you can get hold of an MBeanServer from a J2SE environment too. -
3. Re: How to get cache size programmatically
somboss Jul 15, 2009 1:22 AM (in response to somboss)Thanks for the reply. My application is deployed in tomcat6.
-
4. Re: How to get cache size programmatically
somboss Jul 15, 2009 6:47 AM (in response to somboss)It appears that CacheJmxWrapper and CacheJmxWrapperMBean are deprecated in jbosscache-core-3.1.0.GA
-
5. Re: How to get cache size programmatically
galder.zamarreno Jul 20, 2009 5:31 AM (in response to somboss)Indeed but we're undeprecating them for JBoss Cache 3.2 since they're still valid ways of accessing the cache via jmx.