docs: private void validateSessionSynchronizationMethod(BeanMetaData bmd,
                                                        Method method,
                                                        Class<?>[] expectedParams,
                                                        String methodType) throws EJBConfigurationException {
          if (method == null) {
              return;
          }
  
          String specificCause = "";
  
          int modifiers = method.getModifiers();
          if (Modifier.isStatic(modifiers)) {
              specificCause += " The 'static' modifier is not allowed.";
          }
  
          if (Modifier.isFinal(modifiers)) {
              specificCause += " The 'final' modifier is not allowed.";
          }
  
          if (method.getReturnType() != Void.TYPE) {
              specificCause += " The return type must be 'void'.";
          }
  
          Class<?>[] paramTypes = method.getParameterTypes();
          if (expectedParams == null || expectedParams.length == 0) {
              if (paramTypes != null && paramTypes.length > 0) {
                  specificCause += " The method must take 0 arguments.";
              }
          } else {
              if (paramTypes == null || paramTypes.length != expectedParams.length) {
                  specificCause += " The method must take " + expectedParams.length +
                                   " arguments.";
              } else {
                  for (int i = 0; i < expectedParams.length; i++) {
                      if (!paramTypes[i].equals(expectedParams[i])) {
                          specificCause += " Parameter number " + i + " of type " +
                                           paramTypes[i] + " must be of type " +
                                           expectedParams[i] + ".";
                      }
                  }
              }
          }
  
          // The spec does not specifically prohibit a throws clause, but also does
          // not indicate one is allowed. To be consistent with what the spec does
          // say about interceptors, a throws clause is being prohibited. If we are
          // required to relax this, consider using the same method that the
          // lifecycle interceptors use: isLifecycleApplicationException.
          Class<?>[] exceptions = method.getExceptionTypes();
          if (exceptions.length > 0) {
              specificCause += " The method must not throw any exceptions.";
          }
  
          if (!"".equals(specificCause)) {
              Tr.error(tc, "INVALID_SESSION_SYNCH_SIGNATURE_CNTR0327E",
                       new Object[] { method, methodType });
              throw new EJBConfigurationException("CNTR0327E: The " + method + " method does not have the required" +
                                                  " method signature for a " + methodType + " session synchronization" +
                                                  " method." + specificCause);
          }
  
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "validateSessionSynchronizationMethod : valid : " + method);
      }