docs: private void flagSFSBRemoveMethods(BeanMetaData bmd, final Method[] allMethodsOfEJB, Map<Method, ArrayList<EJBMethodInfoImpl>> methodInfoMap) throws EJBConfigurationException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          String ejbName = bmd.enterpriseBeanName;
  
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.entry(tc, "flagSFSBRemoveMethods: " + ejbName);
          }
  
          // First process any method that is annotated as a remove method
          // if metadata complete is false. This is done first since the xml
          // can be used to override the retain if exception setting.
          if (!bmd.metadataComplete) {
              for (Method m : allMethodsOfEJB) {
                  // Does this method have the Remove annotation?
                  Remove ra = m.getAnnotation(Remove.class);
                  if (ra != null) {
                      // find the list of EJBMEthodInfoImpl objects that need to be
                      // flagged as remove methods.
                      ArrayList<EJBMethodInfoImpl> infoList = methodInfoMap.get(m);
                      if (infoList == null) {
                          // CNTR0233E: The {1} enterprise bean specifies an @Remove annotation on the {0} method.
                          // This annotation is not valid because this method is not a business method of this bean.
                          String method = m.toGenericString();
                          Object[] data = new Object[] { method, ejbName };
                          Tr.error(tc, "INVALID_REMOVE_ANNOTATION_CNTR0233E", data);
                          throw new EJBConfigurationException("CNTR0233E:  The " + ejbName + " enterprise bean specifies an @Remove annotation on the " +
                                                              m.toGenericString()
                                                              + " method.  This annotation is not valid because this method is not a business method of this bean.");
                      } else {
                          // Get retainIfException from remove annotation
                          boolean retainIfException = ra.retainIfException();
  
                          // Flag each of the EJBMethodInfoImpl objects for this business method that
                          // it is a SFSB remove method.
                          for (EJBMethodInfoImpl methodInfo : infoList) {
                              methodInfo.setSFSBRemove(retainIfException);
                              if (isTraceOn && tc.isDebugEnabled()) {
                                  Tr.debug(tc, "SFSB @Remove method: " + methodInfo.getInterfaceType()
                                               + " - " + methodInfo.getJDIMethodSignature()
                                               + ", retain-if-exception = " + retainIfException);
                              }
                          }
                      }
                  }
              }
          }
  
          // Now augment or override the results of above processing with remove-method
          // defined in the ejb-jar.xml file (note, eb is set to null if there is no
          // ejb-jar.xml file).
          EnterpriseBean eb = bmd.wccm.enterpriseBean;
          if (eb != null) {
              // Get remove-method list for this Session bean from WCCM and process.
              Session sb = (Session) eb;
              List<RemoveMethod> rmList = sb.getRemoveMethod();
              for (RemoveMethod rm : rmList) {
                  NamedMethod namedMethod = rm.getBeanMethod();
                  String namedMethodName = namedMethod.getMethodName();
                  ArrayList<EJBMethodInfoImpl> infoList = null;
  
                  // Determine if the remove method was specified using style
                  // 1, 2, or 3 and build the list of EJBMethodInfos that need
                  // to be flagged as remove methods.                          d615325
                  if ("*".equals(namedMethodName)) {
                      // style 1 - all methods are considered remove methods
                      infoList = new ArrayList<EJBMethodInfoImpl>(methodInfoMap.size());
                      for (ArrayList<EJBMethodInfoImpl> methodInfoList : methodInfoMap.values()) {
                          infoList.addAll(methodInfoList);
                      }
                  } else if (namedMethod.getMethodParamList() == null) {
                      // style 2 - all methods with the same name are remove methods
                      infoList = new ArrayList<EJBMethodInfoImpl>();
                      for (Method method : methodInfoMap.keySet()) {
                          if (method.getName().equals(namedMethodName)) {
                              infoList.addAll(methodInfoMap.get(method));
                          }
                      }
                  } else {
                      // style 3 - remove method must match both name and parameters
                      Method m = DDUtil.findMethod(namedMethod, allMethodsOfEJB);
                      if (m != null) {
                          infoList = methodInfoMap.get(m);
                      }
                  }
  
                  if (infoList == null || infoList.size() == 0) {
                      // CNTR0233E: Remove annotation can not be applied to method "{0}"
                      // since the method is not a business method of EJB name "{1}".
                      String method = namedMethod.getMethodName();
                      List<String> parms = namedMethod.getMethodParamList();
                      List<String> parmList = parms == null ? Collections.<String> emptyList() : parms;
                      method = method + parmList;
                      Object[] data = new Object[] { method, ejbName };
                      Tr.error(tc, "INVALID_REMOVE_ANNOTATION_CNTR0233E", data);
                      throw new EJBConfigurationException("remove-method annotation can not be applied to method \""
                                                          + method + "\" since the method is not a business method of EJB name \""
                                                          + ejbName + "\"");
                  } else {
                      // Determine if retain-if-exception is set in ejb-jar.xml for this EJB.
                      boolean retainIfExceptionIsSet = rm.isSetRetainIfException(); //d454711
  
                      // Flag each of the EJBMethodInfoImpl objects for this business method that
                      // it is a SFSB remove method.
                      for (EJBMethodInfoImpl methodInfo : infoList) {
                          // Was method annotated as a remove method?
                          if (methodInfo.isSFSBRemoveMethod()) {
                              // Yep, it was annoted with Remove method. Is the ejb-jar.xml
                              // overriding the retain if exception setting?
                              if (retainIfExceptionIsSet) {
                                  // Yep, ejb-jar.xml is overriding the retain if exception,
                                  // so get setting from xml and set it in EJBMethodInfo object.
                                  boolean retainIfException = rm.isRetainIfException();
                                  methodInfo.setSFSBRemove(retainIfException);
                                  if (isTraceOn && tc.isDebugEnabled()) {
                                      Tr.debug(tc, "SFSB remove-method: " + methodInfo.getInterfaceType()
                                                   + " - " + methodInfo.getJDIMethodSignature()
                                                   + ", ejb-jar.xml overriding retain-if-exception to be " + retainIfException);
                                  }
                              }
                          } else {
                              // d454711
                              // Method was not annotated as a remove method, but it is a remove
                              // method in the xml file.  So flag method using information from xml file.
                              // Need to default retain if exception if not specified in xml file.
                              boolean retainIfException = (retainIfExceptionIsSet) ? rm.isRetainIfException() : false; //d454711
                              methodInfo.setSFSBRemove(retainIfException);
                              if (isTraceOn && tc.isDebugEnabled()) {
                                  Tr.debug(tc, "SFSB remove-method: " + methodInfo.getInterfaceType()
                                               + " - " + methodInfo.getJDIMethodSignature()
                                               + ", retain-if-exception = " + retainIfException);
                              }
                          }
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.exit(tc, "flagSFSBRemoveMethods: " + ejbName);
          }
      }