for (SEPersistenceUnitInfo puInfo : persistenceXML.getPersistenceUnitInfos()) {
// If no persistence unit list has been specified or one
// has been specified and this persistence unit info's name
// appears in that list then add it.
if (persistenceUnitList == null || persistenceUnitList.contains(puInfo.getPersistenceUnitName())) {
factory.addPersistenceUnit(puInfo, new PersistenceUnit(puInfo, factory, this));
}
}
}
} finally {
closeInputStream(inStream1);