Reputation: 1535
I m using infinispan and initializing the DefaultCacheManager by this code lines:
GlobalConfigurationBuilder gcb = new GlobalConfigurationBuilder();
gcb.globalJmxStatistics().enabled(false).allowDuplicateDomains(true);
gcb.transport().defaultTransport().addProperty(JGroupsTransport.CONFIGURATION_STRING,
configurator.getProtocolStackString());
ConfigurationBuilder builder = new ConfigurationBuilder();
builder.clustering().cacheMode(CacheMode.DIST_SYNC).expiration().lifespan(24l, TimeUnit.HOURS);
builder.clustering().stateTransfer().awaitInitialTransfer(false);
builder.clustering().hash().numOwners(2);
cacheManager = new DefaultCacheManager(gcb.build(), builder.build());
The above snippet code is present in N war deployed inside the same application server.
So it happens that when i deploy all the war simultaneosly i get a concurrency exception executing the new DefaultManager() instruction
org.infinispan.jmx.JmxDomainConflictException: ISPN000034: There's already a JMX MBean instance type=CacheManager,name="DefaultCacheManager" already registered under 'org.infinispan' JMX domain.
this happens even if i ve specified the configuration property:
allowDuplicateDomains(true);
How can i handle correctly this behaviour?
Upvotes: 0
Views: 232
Reputation: 2737
I created a reproducer for this issue and as far as I can tell it looks OK.
Just a couple of gotchas and hints:
Upvotes: 1