docs: void extractPersistenceUnits(JPAPXml pxml) {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "extractPersistenceUnits : " + pxml);
  
          // Determines the correct schema version, and uses the correct version
          // of JAXB generated classes to parse the persistence.xml file... and
          // the correct version of .xsd to validate against.            F1879-16302
          JaxbPersistence p = JaxbUnmarshaller.unmarshal(pxml);
  
          List<JaxbPUnit> pus = p.getPersistenceUnit();
          for (JaxbPUnit pu : pus) {
              // Guarantee to have a puName from <persistence-unit>
              String puName = pu.getName();
              // Set <persistence-unit>
              JPAApplInfo applInfo = pxml.getApplInfo();
              JPAPuId puId = new JPAPuId(applInfo.getApplName(), pxml.getArchiveName(), puName); // d689596
              JPAPUnitInfo puInfo = applInfo.createJPAPUnitInfo(puId, pxml, ivScopeInfo);
  
              // set XML Schema version
              puInfo.setPersistenceXMLSchemaVersion(p.getVersion());
  
              // Must set the root URL first for other puInfo attribute to reference
              // determine the root of the persistence unit.
              puInfo.setPersistenceUnitRootUrl(pxml.getRootURL());
  
              // JaxbPunit abstraction properly maps the TransactionType from
              // the JAXB generated class to the JPA enum value.          F1879-16302
              puInfo.setTransactionType(pu.getTransactionType());
  
              // Set <persistence-unit>
              puInfo.setPersistenceUnitDescription(pu.getDescription());
  
              // Set <provider>
              puInfo.setPersistenceProviderClassName(pu.getProvider());
  
              // Set <jta-data-source>
              puInfo.setJtaDataSource(pu.getJtaDataSource());
  
              // Set <nonjta-data-source>
              puInfo.setNonJtaDataSource(pu.getNonJtaDataSource());
  
              // Set <mapping-file>
              puInfo.setMappingFileNames(pu.getMappingFile());
  
              // Set <jar-file>
              puInfo.setJarFileUrls(pu.getJarFile(), pxml); //PK62950
  
              // Set <class>
              puInfo.setManagedClassNames(pu.getClazz());
  
              // Set <shared-cache-mode> (mapped by JaxbPUnit abstraction) // F743-8705 F1879-16302
              puInfo.setSharedCacheMode(pu.getSharedCacheMode());
  
              // Set <validataion-mode> (mapped by JaxbPUnit abstraction)  // F743-8705 F1879-16302
              puInfo.setValidationMode(pu.getValidationMode());
  
              // Set <exclude-unlisted-classes>
              puInfo.setExcludeUnlistedClasses(pu.isExcludeUnlistedClasses());
  
              // Set <properties> (mapped by JaxbPUnit abstraction)       F1879-16302
              puInfo.setProperties(pu.getProperties());
  
              if (isTraceOn && tc.isDebugEnabled()) {
                  String rootURLStr = pxml.getRootURL().getFile();
                  int earIndex = rootURLStr.indexOf(applInfo.getApplName() + ".ear"); // d507361
                  if (earIndex != -1) { // d507361
                      rootURLStr = rootURLStr.substring(earIndex // d507361
                                                        + applInfo.getApplName().length() + 5); // d507361
                  } // d507361
                  rootURLStr += PERSISTENCE_XML_RESOURCE_NAME; // d507361
                  Tr.debug(tc, "extractPersistenceUnits : " + applInfo.getApplName() +
                               "|" + pxml.getArchiveName() + "|" + rootURLStr + "|" +
                               puInfo.getPersistenceUnitName() + "|" +
                               ivScopeInfo.getScopeType() + "|" + puInfo.dump());
              }
  
              if (getPuInfo(puName) != null) // d441029
              {
                  Tr.warning(tc,
                             "DUPLICATE_PERSISTENCE_UNIT_DEFINED_CWWJP0007W",
                             puName, applInfo.getApplName(), pxml.getArchiveName()); // d460065
                  puInfo.close(); // d681393
              } else {
                  addPU(puName, puInfo);
  
                  // This getFactory initiates the createEntityManagerFactory call to
                  // the persistence provider for this pu. This process will trigger
                  // the provider to use the jta/non-jta data source defined in the
                  // pu as well as register transformer to the application classloader
                  // so that when entity class is loaded, the provider can enhance
                  // the entity class.
                  //
                  // However if the factory is created at this point, the resource
                  // ref defined for the associated component has not been initialized
                  // yet and hence the java:comp/env scheme of specifying data sources
                  // in persistence.xml can not be processed.
                  //
                  // But, if the factory is NOT created at this point, the provider
                  // will not register the transformer, and thus the class will not
                  // be transformed when it is loaded.
                  //
                  // To solve this problem, the factory will be created now, and a
                  // 'generic' datasource will be provided, but, the created factory
                  // will never be used. When a component finally accesses a factory,
                  // (after the component has started), a new factory will be created,
                  // one for every java:comp/env name context.  Then, each component
                  // will have a factory created with the correct datasource.
                  puInfo.initialize(); // d429219 d510184
              }
  
              JPAIntrospection.visitJPAPUnitInfo(puName, puInfo);
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "extractPersistenceUnits : # of PU defined = " + getPuCount());
      }