docs: static void joinExtendedPC(JPAExPcBindingContext bindingContext, AbstractJPAComponent jpaComponent) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "enlistExtendedPC: " + bindingContext.thisToString());
  
          if (bindingContext.isBmt()) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "enlistExtendedPC: incorrectly called with BMT context");
              throw new IllegalArgumentException();
          }
  
          UOWCoordinator uowCoord = jpaComponent.getUOWCurrent().getUOWCoord();
          if (!uowCoord.isGlobal()) {
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "enlistExtendedPC: incorrectly called outside global tx");
              throw new IllegalStateException();
          }
  
          SynchronizationRegistryUOWScope uowSyncRegistry = getSynchronizationRegistryUOWScope(uowCoord);
  
          // New this binding key only once and update the puid in the loop
          ExPcBindingKey bindingKey = new ExPcBindingKey(bindingContext.getBindId(), null);
          for (JPAPuId puId : bindingContext.getExPcPuIds()) {
              bindingKey.puId = puId;
              ExPcBindingInfo exPcBindingInfo = getExPcBindingInfo(bindingKey);
              boolean txUnsynchronized = exPcBindingInfo.isTxUnsynchronized();
  
              if (exPcBindingInfo.em == null) {
                  if (isTraceOn && tc.isDebugEnabled())
                      Tr.debug(tc, "not joining unused lazy persistence context");
  
                  // Per spec, we should associate an invocation with the
                  // transaction to either give an error now if an incompatible
                  // EM is already associated with the transaction, to give an
                  // error if a subsequent SFSB is enlisted with a different ExPC,
                  // or to ensure that this ExPC is used by all EMs (ExPC or
                  // otherwise) that access the PU from this transaction.  We have
                  // never done this eager enlistment (and instead done lazy
                  // enlistment and lazy EM acquisition), so we can't change now
                  // without risking a change in behavior.
              } else {
                  JPAExEmInvocation invocationEm = getInvocation(uowSyncRegistry, exPcBindingInfo.txKeyPuId);
                  if (invocationEm == null) {
                      if (isTraceOn && tc.isDebugEnabled())
                          Tr.debug(tc, "joining " + exPcBindingInfo.txKeyPuId);
  
                      invocationEm = jpaComponent.getJPARuntime().createExEmInvocation(uowCoord, exPcBindingInfo.em, txUnsynchronized);
                      setInvocation(uowSyncRegistry, exPcBindingInfo.txKeyPuId, invocationEm);
  
                      // JPA 5.9.1 Container Responsibilities
                      //
                      // For stateful session beans with extended persistence contexts:
                      // ** When a business method of the stateful session bean is invoked, if the stateful
                      //    session bean uses container managed transaction demarcation, and the entity
                      //    manager is not already associated with the current JTA transaction, the
                      //    container associates the entity manager with the current JTA transaction and
                      //    calls EntityManager.joinTransaction.
  
                      // Verify that the tx synchronizations are compatible
                      if (txUnsynchronized != invocationEm.ivUnsynchronized) {
                          Tr.error(tc, "JPATXSYNC_ILLEGAL_PROPAGATION_CWWJP0046E");
                          String msgTxt = "CWWJP0046E: An UNSYNCHRONIZED JPA persistence context cannot be propagated into a SYNCHRONIZED EntityManager.";
                          throw new IllegalStateException(msgTxt);
                      }
                      if (!txUnsynchronized) {
                          exPcBindingInfo.em.joinTransaction();
                      }
                  } else {
                      // JPA 5.9.1 Container Responsibilities
                      //
                      // For stateful session beans with extended persistence contexts:
                      // ** If there is a different persistence context already associated with the JTA
                      //    transaction, the container throws the EJBException.
                      if (invocationEm.ivEm != exPcBindingInfo.em) {
                          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
                              Tr.exit(tc, "enlistExtendedPC : Different persistence context already associate with a JTA tx.");
                          throw jpaComponent.getExPcBindingContext().newEJBException
                                          ("5.9.1 A persistence context is associated to the current JTA transaction " +
                                           "and it is different than the extend-scoped persistence context bound to this SFSB.");
                      }
  
                      // Verify that the tx synchronizations are compatible
                      if (txUnsynchronized != invocationEm.ivUnsynchronized) {
                          Tr.error(tc, "JPATXSYNC_INCOMPATIBLE_PROPAGATION_CWWJP0047E",
                                   exPcBindingInfo.txKeyPuId,
                                   (invocationEm.ivUnsynchronized ? "UNSYNCHRONIZED" : "SYNCHRONIZED"),
                                   bindingContext.getName());
  
                          StringBuilder sb = new StringBuilder();
                          sb.append("CWWJP0047E: The persistence context associated with persistence unit '");
                          sb.append(exPcBindingInfo.txKeyPuId);
                          sb.append("' has SynchronizationType of type ");
                          sb.append((invocationEm.ivUnsynchronized ? "UNSYNCHRONIZED" : "SYNCHRONIZED"));
                          sb.append(", which is incompatible with the extended persistence context ");
                          sb.append("declared by ");
                          sb.append(bindingContext.getName());
                          throw new IllegalStateException(new String(sb));
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "enlistExtendedPC");
      }