docs: private EntityManagerFactory createEMFactory(PersistenceUnitInfo puInfo, boolean ignoreProviderCNFE) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled()) {
              Tr.entry(tc, "createEMFactory : " + puInfo);
          }
          Map<String, Object> integrationProperties = new HashMap<String, Object>();
          JPAProviderIntegration integration = getJPAComponent().getJPAProviderIntegration();
          integration.updatePersistenceProviderIntegrationProperties(puInfo, integrationProperties);
  
          // When creating the base EntityManagerFactory with GenericDataSource
          // (for java:comp/env), suppress the info and warning messages
          // that indicate the GenericDataSource is not supported.        d510184
          if (ivEMFactory == null && ivEMFMap != null) {
              integration.disablePersistenceUnitLogging(integrationProperties);
          }
  
          // Starting with JPA 2.0, the application server must make the
          // ValidatorFactory available to the provider.          F743-12524 PM65716
          getJPAComponent().addIntegrationProperties(xmlSchemaVersion,
                                                     integrationProperties);
  
          if (isTraceOn && tc.isDebugEnabled()) {
              Tr.debug(tc, "createContainerEMF properties:" + this.toString());
              Tr.debug(tc, "createContainerEMF integration-properties:" +
                           integrationProperties);
          }
  
          EntityManagerFactory emfactory;
          Object oldClassLoader = svThreadContextAccessor.pushContextClassLoaderForUnprivileged(ivClassLoader);
          try {
              Class<?> providerClass = ivClassLoader.loadClass(ivProviderClassName);
              PersistenceProvider provider = (PersistenceProvider) providerClass.newInstance();
  
              // Use properties defined in default persistence providers in factory creation.
              // Properties defined in PU are used in createEntityManager to override factory settings.
              emfactory = provider.createContainerEntityManagerFactory(puInfo,
                                                                       integrationProperties);
          } catch (PersistenceException e) {
              FFDCFilter.processException(e, CLASS_NAME + ".createEMFactory",
                                          "759", this);
              Tr.error(tc,
                       "CREATE_CONTAINER_ENTITYMANAGER_FACTORY_ERROR_CWWJP0015E",
                       ivProviderClassName, ivArchivePuId.getPuName(), e.getLocalizedMessage());
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "createEMFactory : null", e);
              throw e; // d743091
          } catch (ClassNotFoundException cnfe) {
              // ClassNotFoundException is expected during module start for WABs since they don't actually use JPAPUnitInfo.
              // Perhaps the module start code flow should be completely disabled for them instead?
              if (!ignoreProviderCNFE) {
                  FFDCFilter.processException(cnfe, CLASS_NAME + ".createEMFactory", "1168", this);
                  Tr.error(tc, "JPA_PROVIDER_NOT_FOUND_CWWJP0050E", ivProviderClassName);
              }
              String nlsMessage = Tr.formatMessage(tc, "JPA_PROVIDER_NOT_FOUND_CWWJP0050E", ivProviderClassName);
              throw new RuntimeException(nlsMessage, cnfe);
          } catch (Exception e) {
              // Combined catch clause for IllegalAccessException and InstantiationException
              FFDCFilter.processException(e, CLASS_NAME + ".createEMFactory", "773", this);
              Tr.error(tc,
                       "CREATE_CONTAINER_ENTITYMANAGER_FACTORY_ERROR_CWWJP0015E",
                       ivProviderClassName, ivArchivePuId.getPuName(), e);
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "createEMFactory", e);
              throw e instanceof RuntimeException ? (RuntimeException) e : new RuntimeException(e); // d743091
          } finally {
              if (isTraceOn && tc.isDebugEnabled() && oldClassLoader != ThreadContextAccessor.UNCHANGED)
                  Tr.debug(tc, "reverting class loader to " + oldClassLoader);
              svThreadContextAccessor.popContextClassLoaderForUnprivileged(oldClassLoader);
          }
  
          // Indicates an error to log with problem creating a factory, post once only.
          if (emfactory == null) {
              Tr.error(tc, "UNABLE_TO_CREATE_ENTITY_MANAGER_FACTORY_CWWJP0009E",
                       ivArchivePuId.getPuName(), ivProviderClassName, ivPUnitRootURL);
              String message = "EntityManagerFactory has not been created for PU : " + ivArchivePuId;
              if (isTraceOn && tc.isEntryEnabled())
                  Tr.exit(tc, "createEMFactory : IllegalStateException");
              throw new IllegalStateException(message); // d743091
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "createEMFactory : " + emfactory);
  
          return emfactory;
      }