[jboss-dev-forums] [Design of JBossCache] - Re: JBCACHE-1025: JBossCache mbean registration fails on Web
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Apr 18 10:36:24 EDT 2007
OK, thanks for explaining where the name "jboss.cache:service=TreeCache-Group" is coming from. That tells me the when MBeanConfigurator.registerInterceptors() is invoked, preRegister() has *not* been called.
The preRegister() call is a standard JMX callback the MBeanServer is supposed to make when you register a bean that implements the callback interface. Nothing JBoss-specific about it. See javadoc for javax.management.MBeanRegistration.
So it sounds like you're deploying multiple caches and they are conflicting.
If these caches aren't meant to cluster with each other, they should have a unique ClusterName anyway.
Two possible approaches:
1) Add a TreeCache.setObjectName() and in TreeCache override ServiceMBeanSupport.getObjectName(Object name) to return it if available. Control the object name via configuration without depending on the JBoss deployer reading the "mbean" element's name attribute.
2) Programatically register the cache in JMX; don't count on registerInterceptors to do it. Use whatever name you like. Be sure you register it before calling createService().
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038441#4038441
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038441
More information about the jboss-dev-forums
mailing list