docs: private boolean initChannelInChain(Channel channel, Chain chain) throws ChannelException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "initChannelInChain");
          }
          // No need to check parameters since this is called from internal only.
          String channelName = channel.getName();
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "channelName=" + channelName + " chainName=" + chain.getName());
          }
          boolean channelInitialized = false;
          ChannelContainer channelContainer = channelRunningMap.get(channelName);
          if (null == channelContainer) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                  Tr.debug(tc, "Channel not found in runtime so build it");
              }
              // Get the child channel data for this channel
              ChannelData channelsData[] = chain.getChannelsData();
              // Search through the chain's list of channel data. Note, it will always
              // be here.
              int index = 0;
              for (; index < channelsData.length; index++) {
                  if (channelsData[index].getName().equals(channel.getName())) {
                      // Found it.
                      break;
                  }
              }
              if (index == channelsData.length) {
                  ChannelException e = new ChannelException("Channel providing incorrect name; " + channel.getName());
                  if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                      Tr.event(tc, "Channel provided the wrong name, probably the external name instead of the internal one; " + channel.getName());
                  }
                  throw e;
              }
              // Initialize the runtime channel
              try {
                  channel.init();
              } catch (ChannelException ce) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Channel " + channel + " threw ChannelException " + ce.getMessage());
                  throw ce;
              } catch (Throwable e) {
                  FFDCFilter.processException(e, getClass().getName() + ".initChannelInChain", "1168", this, new Object[] { channel });
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                      Tr.debug(tc, "Channel " + channel + " threw non-ChannelException " + e.getMessage());
                  throw new ChannelException(e);
              }
              channelInitialized = true;
              // Create channel container to store information in framework.
              channelContainer = new ChannelContainer(channel, (ChildChannelDataImpl) channelsData[index]);
              // Add channel container to the framework.
              this.channelRunningMap.put(channelName, channelContainer);
          }
          channelContainer.addChainReference(chain);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "initChannelInChain");
          }
          return channelInitialized;
      }