docs: JPAPUnitInfo getPersistenceUnitInfo(String modName, String puName) {
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.entry(tc, "getPersistenceUnitInfo", modName, puName, this);
  
          JPAPUnitInfo rtnVal = null;
          JPAScopeInfo scopeInfo = null;
          if (puName == null || puName.length() == 0) {
              // if no pu name is specified, e.g.
              // @PersistenceUnit EntityManagerFactory emf;
              // try to find a unique pu in the module, then in the archive jars in the ear scope.
              // If there is more than one pu defined, it is an error, return null and log an error
              // entry.
              rtnVal = getUniquePU(modName);
          } else
          // test if pu name has "../" prefix, only if true, then look into the global scope for the
          // pu. Per JPA Spec 6.2.2.
          if (puName.startsWith("../")) {
              synchronized (puScopes) {
                  scopeInfo = puScopes.get(EAR_SCOPE_MODULE_NAME);
              }
  
              if (scopeInfo != null) {
                  String earPuName = puName.substring("../".length());
                  rtnVal = scopeInfo.getPuInfo(earPuName);
              }
          } else
          // look for specific PU, first in the same module, then ear scope if not found.
          {
              synchronized (puScopes) {
                  scopeInfo = puScopes.get(modName);
              }
  
              if (scopeInfo != null) {
                  // if scopeInfo exists, there is at least one PU defined in the scope
                  // see if there is a match.
                  rtnVal = scopeInfo.getPuInfo(puName);
              }
              if (rtnVal == null) {
                  // no PU define in the same scope, need to look for PU in the ear scope
                  synchronized (puScopes) {
                      scopeInfo = puScopes.get(EAR_SCOPE_MODULE_NAME);
                  }
  
                  if (scopeInfo != null) {
                      rtnVal = scopeInfo.getPuInfo(puName);
                  }
              }
          }
          if (rtnVal == null) {
              Tr.error(tc, "PU_NOT_FOUND_CWWJP0029E", applName, modName,
                       puName == null || puName.length() == 0 ? "<default>" : puName);
          }
          if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
              Tr.exit(tc, "getPersistenceUnitInfo", rtnVal != null ? rtnVal.getPersistenceUnitName() : "PU not found");
          return rtnVal;
      }