code: public synchronized boolean doesChannelReferenceChain(String channelName, String chainName) {
          boolean foundRef = false;
          Chain chain = this.chainRunningMap.get(chainName);
          if (chain != null) {
              ChannelData channelsData[] = chain.getChannelsData();
              ChildChannelDataImpl childChannelData = null;
              for (int i = 0; i < channelsData.length; i++) {
                  childChannelData = (ChildChannelDataImpl) channelsData[i];
                  if (childChannelData.getExternalName().equals(channelName)) {
                      foundRef = true;
                      break;
                  }
              }
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "doesChannelReferenceChain: channel=" + channelName + ", chain=" + chainName + ", rc=" + foundRef);
          }
          return foundRef;
      }
docs: Determine if a channel references a chain in the runtime config.
  
  @param channelName
  @param chainName
  @return boolean true if channel is referenced by chain, false otherwise