4 Replies Latest reply on May 25, 2016 4:11 PM by franco80

    Infinispan 8.1.2 There's already a JMX MBean instance type=Cache,name="__cluster_registry_cache__(repl_sync)

    franco80 Novice

      Hi all

       

      i tryied to stop the cache manager like this: CACHE_MANAGER.stop(), but still i can't do this without errors:

       

      Caused by: org.infinispan.jmx.JmxDomainConflictException: ISPN000034: There's already a JMX MBean instance type=Cache,name="__cluster_registry_cache__(repl_sync)",manager="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

       

      I found this [ISPN-4659] DefaultCacheManager.stop() is not removing the GlobalComponentRegistry JMX domain - JBoss Issue Tracker but it's not solved.

       

      I don't want to use option "allowDuplicateDomains", becouse i want to have only one, but i need to use jenkins to redeploy our application. I did unregistering all mbeans from JMX but after redeploy takes too much memmory each time doing this and during redepliy i recive OutOfMemmory error. Later also I added simply removing all caches from cache manager (with unregistering mbeans) with stopping cache manager and it's working fine but can you tell me what is good approach ?

       

      What is working actually is:

       

      CACHE_MANAGER.removeCache(someCacheName);

      CACHE_MANAGER.removeCache("__cluster_registry_cache__(repl_sync)");

      unregisterMBean();

      CACHE_MANAGER.stop();

       

      can you please advise what approach should be used to redeploy application ?