[jboss-dev-forums] [Design of JBossCache] - Re: JBCACHE-1025: JBossCache mbean registration fails on Web

JerryGauth do-not-reply at jboss.com
Wed Apr 18 07:50:27 EDT 2007


When a TreeCache instance is registered in JMX, the "cluster name" is used as the registration name.  If the TreeCache has no cluster name (i.e., it's not clustered and the cluster name hasn't been explicitly set), a default name of TreeCache-Group is used.

Because of this, it appears that a best practice is to always provide a unique cluster name for a cache where statistics will be exposed.  Otherwise the first cache instance to register itself with the default name will be the only one to have its statistics accessible via JMX.

If the cache has a "service name", then the service name is used for registration.  If there is no service name, we concatenate the "jboss.cache:service=" prefix with the cache's cluster name.

I haven't looked closely at the origin of the service name but it seems likely that this name isn't available when running in non-JBoss environments.  It's also presumably not available when running on JBoss without a service configuration file (e.g., when creating the cache in application code).

I'm not familiar with the preRegister process.  Perhaps we should be using it when registering mbeans for which no service name has been provided?

I'll have to look closer at how the service name is provided for TreeCache.

re: the interceptors, my observation was essentially that it wouldn't be sufficient to store the cache's WAS registration suffix and simply append it to the interceptor registration names.  It would be necessary to store the WAS registration names for each interceptor as well as for the cache itself.  So it seems like we would need to maintain a map of registration names rather than simply a single variable. At least that's what seems necessary at first glance.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038321#4038321

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038321



More information about the jboss-dev-forums mailing list