docs: private void processSessionSynchronizationMD(BeanMetaData bmd, Session bean) throws EJBConfigurationException {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "processSessionSynchronizationMD : " + bmd.j2eeName);
  
          Class<?>[] afterCompletionParams = new Class<?>[] { Boolean.TYPE };
  
          // First, obtain each method object that was specified in XML.
          if (bean != null) {
              bmd.ivAfterBegin = getSessionSynchMethod(bmd,
                                                       bean.getAfterBeginMethod(),
                                                       null,
                                                       "after-begin-method");
              bmd.ivBeforeCompletion = getSessionSynchMethod(bmd,
                                                             bean.getBeforeCompletionMethod(),
                                                             null,
                                                             "before-completion-method");
              bmd.ivAfterCompletion = getSessionSynchMethod(bmd,
                                                            bean.getAfterCompletionMethod(),
                                                            afterCompletionParams,
                                                            "after-completion-method");
          }
  
          // Second, if any of the methods were not present in XML,
          // look for annotations of those not found in XML.
          if (!bmd.metadataComplete &&
              (bmd.ivAfterBegin == null ||
               bmd.ivBeforeCompletion == null ||
               bmd.ivAfterCompletion == null)) {
              findAnnotatedSessionSynchMethods(bmd);
          }
  
          // Finally, validate all methods found against the specification.
          validateSessionSynchronizationMethod(bmd, bmd.ivAfterBegin,
                                               null, "after-begin-method");
          validateSessionSynchronizationMethod(bmd, bmd.ivBeforeCompletion,
                                               null, "before-completion-method");
          validateSessionSynchronizationMethod(bmd, bmd.ivAfterCompletion,
                                               afterCompletionParams, "after-completion-method");
  
          if ((bmd.ivAfterBegin != null ||
               bmd.ivBeforeCompletion != null ||
               bmd.ivAfterCompletion != null)
              &&
              SessionSynchronization.class.isAssignableFrom(bmd.enterpriseBeanClass)) {
              J2EEName j2eeName = bmd.j2eeName;
              Method method = (bmd.ivAfterBegin != null) ? bmd.ivAfterBegin : ((bmd.ivBeforeCompletion != null) ? bmd.ivBeforeCompletion : bmd.ivAfterCompletion);
              Tr.error(tc, "BOTH_SESSION_SYNCH_STYLES_CNTR0323E",
                       new Object[] { j2eeName.getComponent(), j2eeName.getModule(),
                                      j2eeName.getApplication(), method });
              throw new EJBConfigurationException("CNTR0323E: The " + j2eeName.getComponent() + " bean in the " +
                                                  j2eeName.getModule() + " module of the " + j2eeName.getApplication() +
                                                  " application implements the javax.ejb.SessionSynchronization" +
                                                  " interface and also configures a session synchronization method" +
                                                  " in the ejb-jar.xml or with an annotation. The configured session" +
                                                  " synchronization method is " + method);
          }
  
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.exit(tc, "processSessionSynchronizationMD : found = " +
                          (bmd.ivAfterBegin != null ||
                           bmd.ivBeforeCompletion != null ||
                           bmd.ivAfterCompletion != null));
          }
      }