throw new InvalidPersistenceUnitException();
}
for(Entry<String, ? extends ManagedPersistenceUnitInfo> entry :
persistenceUnits.entrySet()){
ManagedPersistenceUnitInfo mpui = entry.getValue();
emfs.put(entry.getKey(), new CountingEntityManagerFactory(
providerService.createContainerEntityManagerFactory(
mpui.getPersistenceUnitInfo(), mpui.getContainerProperties()), entry.getKey()));
}
} finally {
//Remember to unget the provider
containerContext.ungetService(provider);
}