Details
-
Bug
-
Resolution: Done
-
Critical
-
None
Description
RemoteSpringSessionTest and EmbeddedSpringSessionTest use the default cache jmx configuration, so they try to register the same JMX object names. If they run in parallel, one of them will fail to start the cache manager:
org.infinispan.jmx.JmxDomainConflictException: ISPN000034: There's already a JMX MBean instance type=CacheManager,name="DefaultCacheManager" already 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 at org.infinispan.jmx.JmxUtil.buildJmxDomain(JmxUtil.java:53) at org.infinispan.jmx.CacheManagerJmxRegistration.updateDomain(CacheManagerJmxRegistration.java:79) at org.infinispan.jmx.CacheManagerJmxRegistration.buildRegistrar(CacheManagerJmxRegistration.java:73) at org.infinispan.jmx.AbstractJmxRegistration.registerMBeans(AbstractJmxRegistration.java:37) at org.infinispan.jmx.CacheManagerJmxRegistration.start(CacheManagerJmxRegistration.java:41) at org.infinispan.manager.DefaultCacheManager.start(DefaultCacheManager.java:661) at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:235) at org.infinispan.manager.DefaultCacheManager.<init>(DefaultCacheManager.java:147) at org.infinispan.integrationtests.spring.boot.session.remote.RemoteSpringSessionTest.beforeclass(RemoteSpringSessionTest.java:29)
If the cache manager was not created, teardown also fails with a NPE:
java.lang.NullPointerException at org.infinispan.integrationtests.spring.boot.session.remote.RemoteSpringSessionTest.afterClass(RemoteSpringSessionTest.java:41)
The test should use the TestCacheManagerFactory methods to create the cache manager, which will set a unique JMX domain name for each instance.
Attachments
Issue Links
- is related to
-
JDG-539 RemoteSpringSessionTest fails with NPE
- Closed