persistenceProviderDeploymentHolder = deploymentUnit.getParent().getAttachment(JpaAttachments.DEPLOYED_PERSISTENCE_PROVIDER);
}
for (PersistenceUnitMetadataHolder holder : puList) {
for (PersistenceUnitMetadata pu : holder.getPersistenceUnits()) {
pu.setClassLoader(classLoader);
pu.setTempClassloader(new TempClassLoader(classLoader));
try {
final HashMap properties = new HashMap();
if (!ValidationMode.NONE.equals(pu.getValidationMode())) {
ValidatorFactory validatorFactory = SerializableValidatorFactory.getINSTANCE();
properties.put("javax.persistence.validation.factory", validatorFactory);