开发者

JBossCache: setting uniqueid for proper JMX monitoring

开发者_如何学C

JBossCache creates uniqueId's used for the JMX beans. If I look via JMX at jboss.cache:service=JBossCache I see something randomly generated like "12e4860e", "170278e5" ... Now having several Persistence Units I don't know which is which. Actually there is a Bean which is named as the given cluster name but this one does not contain any statistics, but it's RPCManager shows the unique one's as members. The statistics seem to be at the uniquely named Beans.

Does somebody know how I can configure the uniqueId or how I could differentiate between the Persistence Units?

I'm using JBossCache (3.1.0.GA) as a 2LC for Hibernate 3.4 and Glassfish v2.


After some investigation I came to the following answer: you can't! (at least for LOCAL caches) I use local query caches and these were the one's I was wondering about.

The JmxRegistrationManager.processBaseName(ObjectName baseName) tells the reason:

if (cacheSpi.getConfiguration().getCacheMode().equals(Configuration.CacheMode.LOCAL)) {
    objectNameBase = LOCAL_CACHE_PREFIX + Integer.toHexString(System.identityHashCode(cacheSpi));         
}

So there is no out-of-the-box way of changing the name.

Clustered caches on the other hand are named after the ClusterName in the configuration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜