aQuip
aQuip

Reputation: 591

Infinispan JMX error

Hello I'm getting following error:

ERROR JmxUtil - ISPN000034: There's already an cache manager instance registered under 'org.infinispan' JMX domain. If you want to allow multiple instances configured with same JMX domain enable 'allowDuplicateDomains' attribute in 'globalJmxStatistics' config element

My question is where and how can i configure this option programmatically and is there a method to unregister the cacheManager from JMX so this error will not occur everytime.

Upvotes: 3

Views: 3789

Answers (1)

Dan Berindei
Dan Berindei

Reputation: 7194

You can allow multiple cache managers to register in the same JMX domain with

new GlobalConfigurationBuilder().globalJmxStatistics().allowDuplicateDomains(true)

However, if you have multiple cache managers active at a time, you should ideally configure a different domain for each of them with

new GlobalConfigurationBuilder().globalJmxStatistics().jmxDomain("domain")

Also, make sure you call cacheManager.stop() when you stop using a cache manager to unregister its MBeans from JMX.

Upvotes: 8

Related Questions