Buggy code:
for ( Property remoteSiteProperty : relay . get ( RemoteSiteResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ) { String remoteSiteName = remoteSiteProperty . getName ( ) ; String channelName = CHANNEL . resolveModelAttribute ( context , remoteSiteProperty . getValue ( ) ) . asString ( ) ; StackAddHandler . RemoteSite remoteSite = new StackAddHandler . RemoteSite ( remoteSiteName , channelName ) ; remoteSites . add ( remoteSite ) ; channels . add ( new AbstractMap . SimpleImmutableEntry ( channelName , remoteSite . getChannelInjector ( ) ) ) ; } } } String timerExecutor = ModelNodes . asString ( TIMER_EXECUTOR . resolveModelAttribute ( context , transport ) ) ; String threadFactory = ModelNodes . asString ( THREAD_FACTORY . resolveModelAttribute ( context , transport ) ) ; String diagnosticsSocketBinding = ModelNodes . asString ( DIAGNOSTICS_SOCKET_BINDING . resolveModelAttribute ( context , transport ) ) ; String defaultExecutor = ModelNodes . asString ( DEFAULT_EXECUTOR . resolveModelAttribute ( context , transport ) ) ; String oobExecutor = ModelNodes . asString ( OOB_EXECUTOR . resolveModelAttribute ( context , transport ) ) ; String transportSocketBinding = ModelNodes . asString ( SOCKET_BINDING . resolveModelAttribute ( context , transport ) ) ; StackAddHandler . ProtocolStack stackConfig = new StackAddHandler . ProtocolStack ( name , transportConfig , relayConfig ) ; ServiceTarget target = context . getServiceTarget ( ) ; ServiceBuilder < ChannelFactory > builder = target . addService ( ChannelFactoryService . getServiceName ( name ) , new ChannelFactoryService ( stackConfig ) ) . addDependency ( SERVICE_NAME , ProtocolDefaults . class , stackConfig . getDefaultsInjector ( ) ) . addDependency ( ServerEnvironmentService . SERVICE_NAME , ServerEnvironment . class , stackConfig . getEnvironmentInjector ( ) ) . addDependency ( JBOSS_SERVICE_MODULE_LOADER , ModuleLoader . class , stackConfig . getModuleLoaderInjector ( ) ) ; StackAddHandler . addSocketBindingDependency ( builder , transportSocketBinding , transportConfig . getSocketBindingInjector ( ) ) ; if ( model . hasDefined ( ProtocolResourceDefinition . WILDCARD_PATH . getKey ( ) ) ) { List < Property > protocols = model . get ( ProtocolResourceDefinition . WILDCARD_PATH . getKey ( ) ) . asPropertyList ( ) ; List < Map . Entry < StackAddHandler . Protocol , String > > protocolSocketBindings = new java . util . ArrayList ( protocols . size ( ) ) ; for ( Property protocolProperty : protocols ) { ModelNode protocol = protocolProperty . getValue ( ) ; module = ModelNodes . asModuleIdentifier ( MODULE . resolveModelAttribute ( context , protocol ) ) ; StackAddHandler . Protocol protocolConfig = new StackAddHandler . Protocol ( protocolProperty . getName ( ) , module ) ; StackAddHandler . initProtocolProperties ( context , protocol , protocolConfig ) ; stackConfig . getProtocols ( ) . add ( protocolConfig ) ; String protocolSocketBinding = ModelNodes . asString ( SOCKET_BINDING . resolveModelAttribute ( context , protocol ) ) ; protocolSocketBindings . add ( new AbstractMap . SimpleImmutableEntry < > ( protocolConfig , protocolSocketBinding ) ) ; } for ( Map . Entry < StackAddHandler . Protocol , String > entry : protocolSocketBindings ) { StackAddHandler . addSocketBindingDependency ( builder , entry . getValue ( ) , entry . getKey ( ) . getSocketBindingInjector ( ) ) ; } } StackAddHandler . addSocketBindingDependency ( builder , diagnosticsSocketBinding , transportConfig . getDiagnosticsSocketBindingInjector ( ) ) ; StackAddHandler . addExecutorDependency ( builder , defaultExecutor , transportConfig . getDefaultExecutorInjector ( ) ) ; StackAddHandler . addExecutorDependency ( builder , oobExecutor , transportConfig . getOOBExecutorInjector ( ) ) ; if ( timerExecutor != null ) { builder . addDependency ( ThreadsServices . executorName ( timerExecutor ) , ScheduledExecutorService . class , transportConfig . getTimerExecutorInjector ( ) ) ; } if ( threadFactory != null ) { builder . addDependency ( ThreadsServices . threadFactoryName ( threadFactory ) , ThreadFactory . class , transportConfig . getThreadFactoryInjector ( ) ) ; } for ( Map . Entry < String , Injector < Channel > > entry : channels ) { builder . addDependency ( ChannelService . getServiceName ( entry . getKey ( ) ) , Channel . class , entry . getValue ( ) ) ; } builder . setInitialMode ( ON_DEMAND ) . install ( ) ; <START_BUG> new org . jboss . as . clustering . naming . BinderServiceBuilder ( target ) . build ( ChannelFactoryService . createChannelFactoryBinding ( name ) , ChannelFactoryService . getServiceName ( name ) , ChannelFactory . class ) . install ( ) ; <END_BUG> } static void removeRuntimeServices ( OperationContext context , ModelNode operation , ModelNode model ) { } static void initProtocolProperties ( OperationContext context , ModelNode protocol , StackAddHandler . Protocol protocolConfig ) throws OperationFailedException { } private static void addSocketBindingDependency ( ServiceBuilder < ChannelFactory > builder , String socketBinding , Injector < SocketBinding > injector ) { } private static void addExecutorDependency ( ServiceBuilder < ChannelFactory > builder , String executor , Injector < Executor > injector ) { } static class ProtocolStack implements ProtocolStackConfiguration { private final InjectedValue < ProtocolDefaults > defaults = new InjectedValue ( ) ; private final InjectedValue < ServerEnvironment > environment = new InjectedValue ( ) ; private final InjectedValue < ModuleLoader > loader = new InjectedValue ( ) ; private final String name ; private final TransportConfiguration transport ; private final RelayConfiguration relay ; private final List < ProtocolConfiguration > protocols = new LinkedList < > ( ) ; ProtocolStack ( String name , TransportConfiguration transport , RelayConfiguration relay ) { } Injector < ProtocolDefaults > getDefaultsInjector ( ) { } Injector < ServerEnvironment > getEnvironmentInjector ( ) { } Injector < ModuleLoader > getModuleLoaderInjector ( ) { } @ Override public TransportConfiguration getTransport ( ) { } @ Override public List < ProtocolConfiguration > getProtocols ( ) { } @ Override public String getName ( ) { } @ Override public ProtocolDefaults getDefaults ( ) { } @ Override public ServerEnvironment getEnvironment ( ) { }

Fix:
new org . jboss . as . clustering . naming . BinderServiceBuilder ( ChannelFactoryService . createChannelFactoryBinding ( name ) , ChannelFactoryService . getServiceName ( name ) , ChannelFactory . class ) . build ( target ) . install ( ) ;