ModelNode transport = operation.get(ModelKeys.TRANSPORT);
Transport transportConfig = new Transport(transport.require(ModelKeys.TYPE).asString());
ProtocolStack stackConfig = new ProtocolStack(name, transportConfig);
ServiceBuilder<ChannelFactory> builder = context.getServiceTarget()
.addService(ChannelFactoryService.getServiceName(name), new ValueService<ChannelFactory>(new ImmediateValue<ChannelFactory>(new JChannelFactory(stackConfig))))
.addDependency(ProtocolDefaultsService.SERVICE_NAME, ProtocolDefaults.class, stackConfig.getDefaultsInjector())
.addDependency(DependencyType.OPTIONAL, ServiceName.JBOSS.append("mbean", "server"), MBeanServer.class, stackConfig.getMBeanServerInjector());
build(builder, transport, transportConfig);
addSocketBindingDependency(builder, transport, ModelKeys.DIAGNOSTICS_SOCKET_BINDING, transportConfig.getDiagnosticsSocketBindingInjector());
addExecutorDependency(builder, transport, ModelKeys.DEFAULT_EXECUTOR, transportConfig.getDefaultExecutorInjector());