code: JPAPUnitInfo getUniquePuInfo() {
          final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
          if (isTraceOn && tc.isEntryEnabled())
              Tr.entry(tc, "getUniquePuInfo");
  
          JPAPUnitInfo rtnVal = null;
  
          synchronized (pxmlsInfo) {
              for (JPAPxmlInfo pxmlInfo : pxmlsInfo.values()) {
                  Set<String> puNames = pxmlInfo.getPuNames();
                  if (rtnVal == null && puNames.size() == 1) {
                      rtnVal = pxmlInfo.getPuInfo(puNames.iterator().next());
                  } else {
                      // the current persistence.xml may have 0 persistence unit
                      // <xsd:element name="persistence-unit" minOccurs="0"
                      if (puNames.size() != 0) // d392996.3
                      {
                          rtnVal = null;
                          break;
                      }
                  }
              }
          }
  
          if (isTraceOn && tc.isEntryEnabled())
              Tr.exit(tc, "getUniquePuInfo", rtnVal);
          return rtnVal;
      }
docs: Returns an unique PersistenceUnitInfo object if there is only persistence unit defines
  in this scope, otherwise null is returned.