Buggy code:
public class InfinispanBackingCacheEntryStoreSource < K extends Serializable , V extends Cacheable < K > , G extends Serializable > extends AbstractBackingCacheEntryStoreSource < K , V , G > implements ClusteredBackingCacheEntryStoreSource < K , V , G > { public static final short SCOPE_ID = 223 ; private String cacheName = DEFAULT_BACKING_CACHE ; private int maxSize = ClusteredBackingCacheEntryStoreConfig . DEFAULT_MAX_SIZE ; private boolean passivateEventsOnReplicate = DEFAULT_PASSIVATE_EVENTS_ON_REPLICATE ; private final MarshallerFactory factory = Marshalling . getMarshallerFactory ( "river" , MarshallerFactory . class . getClassLoader ( ) ) ; private CacheInvoker invoker = new RetryingCacheInvoker ( 0 , 0 ) ; @ SuppressWarnings ( "rawtypes" ) private final InjectedValue < Cache > groupCache = new InjectedValue < Cache > ( ) ; private final InjectedValue < SharedLocalYieldingClusterLockManager > lockManager = new InjectedValue < SharedLocalYieldingClusterLockManager > ( ) ; @ Override public void addDependencies ( ServiceTarget target , ServiceBuilder < ? > builder ) { ServiceName baseServiceName = EmbeddedCacheManagerService . getServiceName ( null ) ; ServiceName serviceName = ServiceName . parse ( ( ( this . cacheName ) != null ? this . cacheName : DEFAULT_BACKING_CACHE ) ) ; if ( ! ( baseServiceName . isParentOf ( serviceName ) ) ) { serviceName = baseServiceName . append ( serviceName ) ; } if ( ( serviceName . length ( ) ) < 4 ) { serviceName = serviceName . append ( DEFAULT_CACHE_NAME ) ; } String container = serviceName . getParent ( ) . getSimpleName ( ) ; final CoreGroupCommunicationServiceService groupCommunicationService = new CoreGroupCommunicationServiceService ( InfinispanBackingCacheEntryStoreSource . SCOPE_ID ) ; <START_BUG> groupCommunicationService . build ( target , container ) . setInitialMode ( ON_DEMAND ) . addDependency ( SERVICE_NAME , GroupMembershipNotifierRegistry . class , groupCommunicationService . getGroupMembershipNotifierRegistryInjector ( ) ) . install ( ) ; <END_BUG> new SharedLocalYieldingClusterLockManagerService ( container ) . build ( target ) . setInitialMode ( ON_DEMAND ) . install ( ) ; builder . addDependency ( serviceName , Cache . class , this . groupCache ) ; builder . addDependency ( SharedLocalYieldingClusterLockManagerService . getServiceName ( container ) , SharedLocalYieldingClusterLockManager . class , this . lockManager ) ; } @ Override public < E extends SerializationGroup < K , V , G > > BackingCacheEntryStore < G , Cacheable < G > , E > createGroupIntegratedObjectStore ( PassivationManager < G , E > passivationManager , StatefulTimeoutInfo timeout ) { } @ Override public < E extends SerializationGroupMember < K , V , G > > BackingCacheEntryStore < K , V , E > createIntegratedObjectStore ( final String beanName , PassivationManager < K , E > passivationManager , StatefulTimeoutInfo timeout ) { } private AbstractLoaderConfigurationBuilder < ? > addCacheLoader ( LoadersConfigurationBuilder loadersBuilder , AbstractLoaderConfiguration config , String beanName ) { } private String createBeanLocation ( String location , String beanName ) { } @ Override public String getBackingCache ( ) { } @ Override public void setBackingCache ( String cacheName ) { } @ Override public boolean isPassivateEventsOnReplicate ( ) { } @ Override public void setPassivateEventsOnReplicate ( boolean passivateEventsOnReplicate ) { } @ Override public int getMaxSize ( ) { } @ Override public void setMaxSize ( int maxSize ) { } }

Fix:
groupCommunicationService . build ( target , container ) . setInitialMode ( ON_DEMAND ) . addDependency ( OPTIONAL , SERVICE_NAME , GroupMembershipNotifierRegistry . class , groupCommunicationService . getGroupMembershipNotifierRegistryInjector ( ) ) . install ( ) ;