code: @Override
      public synchronized void removeChainEventListener(ChainEventListener cel, String chainName) throws InvalidChainNameException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "removeChainEventListener: chainName=" + chainName + " listener=" + cel);
          }
          ChainDataImpl chainData = null;
          if (null == chainName) {
              InvalidChainNameException e = new InvalidChainNameException("Unregister listener for null chain name");
              //Race condition can occur where chain is stopped before we register the listener, no need to FFDC
              //FFDCFilter.processException(e, getClass().getName() + ".addChainEventListener", "2910", this, new Object[] { chainName, this });
              throw e;
          }
  
          // Handle a listener unregistering for events from all chains.
          if (chainName.equals(ChainEventListener.ALL_CHAINS)) {
              for (ChainData chain : this.chainDataMap.values()) {
                  ((ChainDataImpl) chain).removeChainEventListener(cel);
              }
              this.globalChainEventListeners.remove(cel);
          } else {
              // Extract the chain config from the framework.
              chainData = this.chainDataMap.get(chainName);
              // Verify the chain config is in the framework.
              if (null == chainData) {
                  InvalidChainNameException e = new InvalidChainNameException("Unable to unregister listener for unknown chain config, " + chainName);
                  FFDCFilter.processException(e, getClass().getName() + ".removeChainEventListener", "2948", this, new Object[] { chainName, this });
                  throw e;
              } else if (globalChainEventListeners.contains(cel)) {
                  // Can't remove a global listener from individual chains
                  InvalidChainNameException e = new InvalidChainNameException("Can't remove a global listener from individual chains, " + chainName);
                  FFDCFilter.processException(e, getClass().getName() + ".removeChainEventListener", "2953", this, new Object[] { chainName, this });
                  throw e;
              }
              chainData.removeChainEventListener(cel);
          }
      }
docs: /*
  @see
  com.ibm.wsspi.channelfw.ChannelFramework#removeChainEventListener(com.ibm
  .wsspi.channelfw.ChainEventListener, java.lang.String)