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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...