docs: private Method getSessionSynchMethod(BeanMetaData bmd,
                                           NamedMethod namedMethod,
                                           Class<?>[] expectedParams,
                                           String xmlType) throws EJBConfigurationException {
          if (namedMethod == null) {
              if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
                  Tr.debug(tc, xmlType + " not specified in XML");
              return null;
          }
  
          String methodName = namedMethod.getMethodName().trim();
          List<String> paramTypes = namedMethod.getMethodParamList();
          if (paramTypes != null) {
              if (expectedParams == null || expectedParams.length == 0) {
                  if (paramTypes.size() > 0) {
                      J2EEName j2eeName = bmd.j2eeName;
                      Tr.error(tc, "INVALID_SESSION_SYNCH_PARAM_CNTR0324E",
                               new Object[] { methodName, xmlType, j2eeName.getComponent(),
                                              j2eeName.getModule(), j2eeName.getApplication() });
                      throw new EJBConfigurationException("CNTR0324E: The " + methodName + " method configured in the ejb-jar.xml" +
                                                          " file does not have the required method signature for a " + xmlType +
                                                          " session synchronization method for the " + j2eeName.getComponent() +
                                                          " bean in the " + j2eeName.getModule() + " module of the " +
                                                          j2eeName.getApplication() + " application. The number of parameters" +
                                                          " configured is " + paramTypes.size() + " but must be 0.");
                  }
              } else {
                  if (paramTypes.size() != expectedParams.length) {
                      J2EEName j2eeName = bmd.j2eeName;
                      Tr.error(tc, "INVALID_SESSION_SYNCH_PARAM_CNTR0324E",
                               new Object[] { methodName, xmlType, j2eeName.getComponent(),
                                              j2eeName.getModule(), j2eeName.getApplication() });
                      int configuredSize = paramTypes.size();
                      throw new EJBConfigurationException("CNTR0324E: The " + methodName + " method configured in the ejb-jar.xml" +
                                                          " file does not have the required method signature for a " + xmlType +
                                                          " session synchronization method for the " + j2eeName.getComponent() +
                                                          " bean in the " + j2eeName.getModule() + " module of the " +
                                                          j2eeName.getApplication() + " application. The number of parameters" +
                                                          " configured is " + configuredSize + " but must be " +
                                                          expectedParams.length + ".");
                  }
                  for (int i = 0; i < expectedParams.length; i++) {
                      if (!paramTypes.get(i).equals(expectedParams[i].getName())) {
                          J2EEName j2eeName = bmd.j2eeName;
                          Tr.error(tc, "INVALID_SESSION_SYNCH_PARAM_CNTR0324E",
                                   new Object[] { methodName, xmlType, j2eeName.getComponent(),
                                                  j2eeName.getModule(), j2eeName.getApplication() });
                          throw new EJBConfigurationException("CNTR0324E: The " + methodName + " method configured in the ejb-jar.xml" +
                                                              " file does not have the required method signature for a " + xmlType +
                                                              " session synchronization method for the " + j2eeName.getComponent() +
                                                              " bean in the " + j2eeName.getModule() + " module of the " +
                                                              j2eeName.getApplication() + " application. The configured parameter" +
                                                              " type is " + paramTypes.get(i) + " but must be " +
                                                              expectedParams[i].getName() + ".");
                      }
                  }
              }
          }
  
          Method method = null;
  
          Exception firstException = null;
          Class<?> clazz = bmd.enterpriseBeanClass;
          while (clazz != Object.class && method == null) {
              try {
                  method = clazz.getDeclaredMethod(methodName, expectedParams);
                  method.setAccessible(true);
              } catch (NoSuchMethodException ex) {
                  // FFDC not required... this may be normal
                  if (firstException == null) {
                      firstException = ex;
                  }
                  clazz = clazz.getSuperclass();
              }
          }
  
          if (method == null) {
              J2EEName j2eeName = bmd.j2eeName;
              Tr.error(tc, "SESSION_SYNCH_METHOD_NOT_FOUND_CNTR0325E",
                       new Object[] { xmlType, methodName, j2eeName.getComponent(),
                                      j2eeName.getModule(), j2eeName.getApplication() });
              throw new EJBConfigurationException("CNTR0325E: The configured " + xmlType + " session synchronization method " +
                                                  methodName + " is not implemented by the " + j2eeName.getComponent() +
                                                  " bean in the " + j2eeName.getModule() + " module of the " +
                                                  j2eeName.getApplication() + " application.", firstException);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, xmlType + " = " + method);
  
          return method;
      }