Buggy code:
public abstract class CacheAdd extends AbstractAddStepHandler { private static final Logger log = Logger . getLogger ( CacheAdd . class . getPackage ( ) . getName ( ) ) ; private static final String DEFAULTS = "infinispan-defaults.xml" ; private static volatile Map < CacheMode , Configuration > defaults = null ; public static synchronized Configuration getDefaultConfiguration ( CacheMode cacheMode ) { } private static ConfigurationBuilderHolder load ( String resource ) { } private static URL find ( String resource , ClassLoader ... loaders ) { } final CacheMode mode ; CacheAdd ( CacheMode mode ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } Collection < ServiceController < ? > > installRuntimeServices ( OperationContext context , ModelNode operation , ModelNode containerModel , ModelNode cacheModel , ServiceVerificationHandler verificationHandler ) throws OperationFailedException { } void removeRuntimeServices ( OperationContext context , ModelNode operation , ModelNode containerModel , ModelNode cacheModel ) throws OperationFailedException { } protected PathAddress getCacheAddressFromOperation ( ModelNode operation ) { } protected PathAddress getCacheContainerAddressFromOperation ( ModelNode operation ) { } ServiceController < ? > installCacheConfigurationService ( ServiceTarget target , String containerName , String cacheName , boolean defaultCache , ModuleIdentifier moduleId , ConfigurationBuilder builder , Configuration config , List < CacheAdd . Dependency < ? > > dependencies , ServiceVerificationHandler verificationHandler ) { final InjectedValue < EmbeddedCacheManager > container = new InjectedValue < EmbeddedCacheManager > ( ) ; final CacheAdd . CacheConfigurationDependencies cacheConfigurationDependencies = new CacheAdd . CacheConfigurationDependencies ( container ) ; final Service < Configuration > service = new CacheConfigurationService ( cacheName , builder , moduleId , cacheConfigurationDependencies ) ; <START_BUG> final ServiceBuilder < ? > configBuilder = target . addService ( CacheConfigurationService . getServiceName ( containerName , cacheName ) , service ) . addDependency ( EmbeddedCacheManagerService . getServiceName ( containerName ) , EmbeddedCacheManager . class , container ) . addDependency ( JBOSS_SERVICE_MODULE_LOADER , ModuleLoader . class , cacheConfigurationDependencies . getModuleLoaderInjector ( ) ) . setInitialMode ( PASSIVE ) ; <END_BUG> if ( config . invocationBatching ( ) . enabled ( ) ) { cacheConfigurationDependencies . getTransactionManagerInjector ( ) . inject ( BatchModeTransactionManager . getInstance ( ) ) ; } else if ( ( config . transaction ( ) . transactionMode ( ) ) == ( TransactionMode . TRANSACTIONAL ) ) { configBuilder . addDependency ( JBOSS_TXN_TRANSACTION_MANAGER , TransactionManager . class , cacheConfigurationDependencies . getTransactionManagerInjector ( ) ) ; if ( config . transaction ( ) . useSynchronization ( ) ) { configBuilder . addDependency ( JBOSS_TXN_SYNCHRONIZATION_REGISTRY , TransactionSynchronizationRegistry . class , cacheConfigurationDependencies . getTransactionSynchronizationRegistryInjector ( ) ) ; } } for ( CacheAdd . Dependency < ? > dependency : dependencies ) { CacheAdd . addDependency ( configBuilder , dependency ) ; } if ( defaultCache ) { configBuilder . addAliases ( CacheConfigurationService . getServiceName ( containerName , null ) ) ; } return configBuilder . install ( ) ; } ServiceController < ? > installCacheService ( ServiceTarget target , String containerName , String cacheName , boolean defaultCache , ServiceController . Mode initialMode , Configuration config , ServiceVerificationHandler verificationHandler ) { } @ SuppressWarnings ( "rawtypes" ) ServiceController < ? > installJndiService ( ServiceTarget target , String containerName , String cacheName , boolean defaultCache , String jndiName , ServiceVerificationHandler verificationHandler ) { } private static JndiName createJndiName ( String container , String cache ) { } private static BindInfo createCacheBinding ( JndiName name ) { } private static < T > void addDependency ( ServiceBuilder < ? > builder , CacheAdd . Dependency < T > dependency ) { } void populate ( ModelNode fromModel , ModelNode toModel ) throws OperationFailedException { } void processModelNode ( OperationContext context , String containerName , ModelNode cache , ConfigurationBuilder builder , List < CacheAdd . Dependency < ? > > dependencies ) throws OperationFailedException { } private static String findStoreKey ( ModelNode cache ) { } private static ModelNode getStoreModelNode ( ModelNode cache ) { } private StoreConfigurationBuilder < ? , ? > buildCacheStore ( OperationContext context , PersistenceConfigurationBuilder persistenceBuilder , String containerName , ModelNode store , String storeKey , List < CacheAdd . Dependency < ? > > dependencies ) throws OperationFailedException { } private static AbstractJdbcStoreConfigurationBuilder < ? , ? > buildJdbcStore ( PersistenceConfigurationBuilder persistenceBuilder , OperationContext context , ModelNode store ) throws OperationFailedException { } private static void buildBinaryKeyedTable ( TableManipulationConfigurationBuilder < ? , ? > builder , OperationContext context , ModelNode table ) throws OperationFailedException { } private static void buildStringKeyedTable ( TableManipulationConfigurationBuilder < ? , ? > builder , OperationContext context , ModelNode table ) throws OperationFailedException { } private static void buildTable ( TableManipulationConfigurationBuilder < ? , ? > builder , OperationContext context , ModelNode table , String defaultTableNamePrefix ) throws OperationFailedException { } private static String getColumnProperty ( OperationContext context , ModelNode table , String columnKey , AttributeDefinition columnAttribute , String defaultValue ) throws OperationFailedException { } protected class Dependency < I > { private final ServiceName name ; private final Class < I > type ; private final Injector < I > target ; Dependency ( ServiceName name ) { } Dependency ( ServiceName name , Class < I > type , Injector < I > target ) { } ServiceName getName ( ) { } public Class < I > getType ( ) { } public Injector < I > getInjector ( ) { } } abstract class SimpleInjector < I > implements Injector < I > { @ Override public void uninject ( ) { } } private static class CacheDependencies implements CacheService . Dependencies { private final Value < EmbeddedCacheManager > container ; private final InjectedValue < XAResourceRecoveryRegistry > recoveryRegistry = new InjectedValue < XAResourceRecoveryRegistry > ( ) ; CacheDependencies ( Value < EmbeddedCacheManager > container ) { } Injector < XAResourceRecoveryRegistry > getRecoveryRegistryInjector ( ) { }

Fix:
final ServiceBuilder < ? > configBuilder = AsynchronousService . addService ( target , CacheConfigurationService . getServiceName ( containerName , cacheName ) , service ) . addDependency ( EmbeddedCacheManagerService . getServiceName ( containerName ) , EmbeddedCacheManager . class , container ) . addDependency ( JBOSS_SERVICE_MODULE_LOADER , ModuleLoader . class , cacheConfigurationDependencies . getModuleLoaderInjector ( ) ) . setInitialMode ( PASSIVE ) ;