+ new HashMap<String, ParsedPersistenceXmlDescriptor>();
+ for (ParsedPersistenceXmlDescriptor descriptor : descriptors)
+ {
+ String unit = descriptor.getName();
+ if (units.containsKey(unit))
+ getLog().warn(
+ "Persistence unit " + unit +
+ " from " + descriptor.getPersistenceUnitRootUrl() +
+ " overwrites unit with the same name from " +
+ units.get(unit).getPersistenceUnitRootUrl()
+ );
+ units.put(unit, descriptor);
+ }