Buggy code:
public class EmbeddedCacheManagerConfigurationService implements EmbeddedCacheManagerConfiguration , Service < EmbeddedCacheManagerConfiguration > { public static ServiceName getServiceName ( String name ) { } interface TransportConfiguration { String getClusterName ( ) { } Long getLockTimeout ( ) { } Channel getChannel ( ) { } ChannelFactory getChannelFactory ( ) { } Executor getExecutor ( ) { } } interface Dependencies { ModuleLoader getModuleLoader ( ) { } EmbeddedCacheManagerConfigurationService . TransportConfiguration getTransportConfiguration ( ) { } MBeanServer getMBeanServer ( ) { } Executor getListenerExecutor ( ) { } ScheduledExecutorService getEvictionExecutor ( ) { } ScheduledExecutorService getReplicationQueueExecutor ( ) { } } private final String name ; private final String defaultCache ; private final boolean statistics ; private final EmbeddedCacheManagerConfigurationService . Dependencies dependencies ; private final ModuleIdentifier moduleId ; private volatile GlobalConfiguration config ; public EmbeddedCacheManagerConfigurationService ( String name , String defaultCache , boolean statistics , ModuleIdentifier moduleIdentifier , EmbeddedCacheManagerConfigurationService . Dependencies dependencies ) { } @ Override public String getName ( ) { } @ Override public String getDefaultCache ( ) { } @ Override public GlobalConfiguration getGlobalConfiguration ( ) { } @ Override public ModuleIdentifier getModuleIdentifier ( ) { } @ Override public EmbeddedCacheManagerConfiguration getValue ( ) { } @ Override public void start ( StartContext context ) throws StartException { GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder ( ) ; ModuleLoader moduleLoader = this . dependencies . getModuleLoader ( ) ; builder . serialization ( ) . classResolver ( ModularClassResolver . getInstance ( moduleLoader ) ) ; try { ClassLoader loader = ( ( this . moduleId ) != null ) ? moduleLoader . loadModule ( this . moduleId ) . getClassLoader ( ) : EmbeddedCacheManagerConfiguration . class . getClassLoader ( ) ; builder . classLoader ( loader ) ; int id = Ids . MAX_ID ; for ( SimpleExternalizer < ? > externalizer : ServiceLoader . load ( SimpleExternalizer . class , loader ) ) { ROOT_LOGGER . debugf ( "Cache<seq2seq4repair_space>container<seq2seq4repair_space>%s<seq2seq4repair_space>will<seq2seq4repair_space>use<seq2seq4repair_space>an<seq2seq4repair_space>externalizer<seq2seq4repair_space>for<seq2seq4repair_space>%s" , this . name , externalizer . getTargetClass ( ) . getName ( ) ) ; builder . serialization ( ) . addAdvancedExternalizer ( ( id ++ ) , externalizer ) ; } } catch ( ModuleLoadException e ) { throw new StartException ( e ) ; } builder . shutdown ( ) . hookBehavior ( DONT_REGISTER ) ; EmbeddedCacheManagerConfigurationService . TransportConfiguration transport = this . dependencies . getTransportConfiguration ( ) ; TransportConfigurationBuilder transportBuilder = builder . transport ( ) ; if ( transport != null ) { transportBuilder . transport ( new org . jboss . as . clustering . infinispan . ChannelTransport ( transport . getChannel ( ) ) ) ; Long timeout = transport . getLockTimeout ( ) ; if ( timeout != null ) { transportBuilder . distributedSyncTimeout ( timeout . longValue ( ) ) ; } ProtocolStackConfiguration stack = transport . getChannelFactory ( ) . getProtocolStackConfiguration ( ) ; Topology topology = stack . getTransport ( ) . getTopology ( ) ; if ( topology != null ) { String site = topology . getSite ( ) ; if ( site != null ) { transportBuilder . siteId ( site ) ; } String rack = topology . getRack ( ) ; if ( rack != null ) { transportBuilder . rackId ( rack ) ; } String machine = topology . getMachine ( ) ; if ( machine != null ) { transportBuilder . machineId ( machine ) ; } } String clusterName = transport . getClusterName ( ) ; transportBuilder . clusterName ( ( clusterName != null ? clusterName : this . name ) ) ; Executor executor = transport . getExecutor ( ) ; if ( executor != null ) { builder . asyncTransportExecutor ( ) . factory ( new ManagedExecutorFactory ( executor ) ) ; } RelayConfiguration relay = stack . getRelay ( ) ; if ( relay != null ) { builder . site ( ) . localSite ( relay . getSiteName ( ) ) ; } } Executor listenerExecutor = this . dependencies . getListenerExecutor ( ) ; if ( listenerExecutor != null ) { builder . asyncListenerExecutor ( ) . factory ( new ManagedExecutorFactory ( listenerExecutor ) ) ; } ScheduledExecutorService evictionExecutor = this . dependencies . getEvictionExecutor ( ) ; if ( evictionExecutor != null ) { builder . evictionScheduledExecutor ( ) . factory ( new ManagedScheduledExecutorFactory ( evictionExecutor ) ) ; } ScheduledExecutorService replicationQueueExecutor = this . dependencies . getReplicationQueueExecutor ( ) ; if ( replicationQueueExecutor != null ) { builder . replicationQueueScheduledExecutor ( ) . factory ( new ManagedScheduledExecutorFactory ( replicationQueueExecutor ) ) ; } GlobalJmxStatisticsConfigurationBuilder jmxBuilder = builder . globalJmxStatistics ( ) . cacheManagerName ( this . name ) ; MBeanServer server = this . dependencies . getMBeanServer ( ) ; if ( server != null ) { <START_BUG> jmxBuilder . enabled ( this . statistics ) . mBeanServerLookup ( new MBeanServerProvider ( server ) ) . jmxDomain ( EmbeddedCacheManagerService . getServiceName ( null ) . getCanonicalName ( ) ) . allowDuplicateDomains ( true ) ; <END_BUG> } else { jmxBuilder . disable ( ) ; } this . config = builder . build ( ) ; } @ Override public void stop ( StopContext context ) { } }

Fix:
jmxBuilder . enabled ( this . statistics ) . mBeanServerLookup ( new MBeanServerProvider ( server ) ) . jmxDomain ( BASE_SERVICE_NAME . getCanonicalName ( ) ) . allowDuplicateDomains ( true ) ;