docs: void initialize() {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
              Tr.debug(tc, "createEntityManagerFactory : " + ivArchivePuId);
  
          if (ivEMFactory != null) {
              throw new IllegalStateException("EntityManagerFactory already created for PU : " + ivArchivePuId);
          }
  
          if (!registerClassFileTransformer(ivClassLoader)) {
              Tr.warning(tc, "APPL_CLASSLOADER_USE_HAS_NO_JPA_SUPPORT_CWWJP0005W", ivArchivePuId.getPuName(), ivPUnitRootURL, ivClassLoader.getClass().getName());
              tempClassLoader = ivClassLoader;
          }
  
          // First, determine the final data source JNDI names.
          AbstractJPAComponent jpaComponent = getJPAComponent();
          ivJtaDataSourceJNDIName = jpaComponent.getDataSourceBindingName(ivJtaDataSourceJNDIName, true);
          ivNonJtaDataSourceJNDIName = jpaComponent.getDataSourceBindingName(ivNonJtaDataSourceJNDIName, false);
  
          // JPA 2.1 Spec 8.2.1.5
          // If neither is specified, the deployer must specify a JTA data source at deployment or the default
          // JTA data source must be provided by the container, and a JTA EntityManagerFactory will be created to
          // correspond to it.
          ivJtaDataSourceJNDIName = jpaComponent.getJPARuntime().processJEE7JTADataSource(ivJtaDataSourceJNDIName, ivNonJtaDataSourceJNDIName);
  
          // Before creating the 'base' EntityManagerFactory which will
          // register any class transformers, check to see if a different
          // EMF is needed per component, and if so, create the map to hold
          // them.  When 'java:comp/env' is used for a datasource, then
          // every component may map to a different database, and thus
          // a different EMF is required for each.
          if ((ivJtaDataSourceJNDIName != null && ivJtaDataSourceJNDIName.startsWith("java:comp/env")) ||
              (ivNonJtaDataSourceJNDIName != null && ivNonJtaDataSourceJNDIName.startsWith("java:comp/env"))) {
              ivEMFMap = new HashMap<J2EEName, EntityManagerFactory>();
          } else {
              // If neither datasource is in the 'java:comp/env' namespace, then
              // make sure any configured datasource can be found. If not, then
              // a GenericDataSource will be used to allow the EM Factory to
              // create... which cannot be used later, so an EM Factory Map must
              // be created to allow a valid EM Factory to be created later, on
              // first use.  If the datasource is still not valid at that point,
              // then the lookup failure will occur at that time. The real intent
              // here is to allow an application with a persistence.xml file that
              // is never used to start without error, yet still provide a
              // meaningful exception for those applications that are just
              // configured incorrectly.                                      d543082
              if ((ivJtaDataSourceJNDIName != null && getJtaDataSource() instanceof GenericDataSource) ||
                  (ivNonJtaDataSourceJNDIName != null && getNonJtaDataSource() instanceof GenericDataSource)) {
                  ivEMFMap = new HashMap<J2EEName, EntityManagerFactory>();
              }
          }
  
          // Also determine the EM Pool capacity.  If not set (-1), then a default
          // will be assigned for an openjpa provider, but not other providers, as
          // tests have shown others not to work well with pooling.          d510184
          ivEMPoolCapacity = jpaComponent.getEntityManagerPoolCapacity(); // F743-18776
  
          if (ivEMPoolCapacity < 0 && jpaComponent.getJPAProviderIntegration().supportsEntityManagerPooling()) {
              ivEMPoolCapacity = JPAConstants.DEFAULT_EM_POOL_CAPACITY;
          }
  
          try {
              ivEMFactory = createEMFactory(this, true);
          } catch (RuntimeException ex) {
              ivEMFactoryException = ex; // d743091
          }
      }