code: @Override
      public synchronized ChainData removeChain(ChainData chain) throws ChainException {
          String chainName = (null != chain) ? chain.getName() : null;
          String entryMsg = "removeChain: " + chainName;
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, entryMsg);
          }
          if (null == chain) {
              throw new InvalidChainNameException("Input chain is null");
          }
  
          // Verify this chain does exist
          if (!chainDataMap.containsKey(chainName)) {
              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;
          }
  
          removeChainInternal(chain);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, entryMsg);
          }
          return chain;
      }
docs: /*
  @see
  com.ibm.wsspi.channelfw.ChannelFramework#removeChain(com.ibm.websphere.
  channelfw.ChainData)