code: @Override
      public synchronized ChainData removeChain(String chainName) throws ChainException {
          String entryMsg = "removeChain: " + chainName;
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, entryMsg);
          }
          if (null == chainName) {
              throw new InvalidChainNameException("Input chain name is null");
          }
  
          // Look for runtime chains.
          Chain chain = chainRunningMap.get(chainName);
          if (chain != null) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                  // Due to timing windows (i.e. multiple channel providers going away), there is
                  // a race to stop and/or clean up chains. This is not a notable condition: the chain can only be removed
                  // once.
                  Tr.exit(tc, entryMsg, "Chain not found");
              }
              return null;
          }
  
          // Find the chain config
          ChainData chainData = chainDataMap.get(chainName);
          if (null == chainData) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
                  // Due to timing windows (i.e. multiple channel providers going away), there is
                  // a race to stop and/or clean up chains. This is not a notable condition: the chain can only be removed
                  // once.
                  Tr.exit(tc, entryMsg, "ChainData not found");
              }
              return null;
          }
          removeChainInternal(chainData);
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, entryMsg);
          }
          return chainData;
      }
docs: /*
  @see com.ibm.wsspi.channelfw.ChannelFramework#removeChain(String)