code: @Override
      public synchronized ChainGroupData addChainGroup(String groupName, String[] chainNames) throws InvalidChainNameException, ChainGroupException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.entry(tc, "addChainGroup: " + groupName);
          }
          if (null == groupName) {
              throw new ChainGroupException("Null group name");
          }
          if ((null == chainNames) || (0 == chainNames.length)) {
              throw new InvalidChainNameException("Null or empty chain name list");
          }
  
          // Create a new group
          ChainData chainDataArray[] = new ChainData[chainNames.length];
          // Verify the chain configurations already exist.
          ChainData chainData = null;
          for (int i = 0; i < chainNames.length; i++) {
              chainData = chainDataMap.get(chainNames[i]);
              if (null != chainData) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Found chain for group, " + chainNames[i]);
                  }
                  // Note, now supporting inbound and outbound chains.
                  chainDataArray[i] = chainData;
              } else {
                  InvalidChainNameException e = new InvalidChainNameException("Missing chain config during add: " + chainNames[i]);
                  FFDCFilter.processException(e, getClass().getName() + ".addChainGroup", "3071", this, new Object[] { chainNames[i] });
                  throw e;
              }
          }
          // At this point we have verified that all the chain configs exist.
          ChainGroupData groupData = createChainGroupData(groupName, chainDataArray);
          this.chainGroups.put(groupName, groupData);
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
              Tr.exit(tc, "addChainGroup");
          }
          return groupData;
      }
docs: /*
  @see
  com.ibm.wsspi.channelfw.ChannelFramework#addChainGroup(java.lang.String,
  java.lang.String[])