> Yes, EntityManagerFactoryBuilder#withValidatorFactory() is called (see
> https://github.com/wildfly/wildfly/blob/10.0.0.CR1/jpa/subsystem/src/main/java/org/jboss/as/jpa/service/PersistenceUnitServiceImpl.java#L150,
> I see it actually happening in the debugger), so I suppose Hibernate
> ORM has the VF at its hands correctly.
> 
> Only that it is not exposed via the
> "javax.persistence.validation.factory" key via the EMF-exposed
> property map any more. So the call to
> 
>     entityManagerFactory().getProperties().get(
> "javax.persistence.validation.factory" );
> 
> returns null whereas it used to return the VF in earlier versions.

I think this is related to this discussion - 
http://lists.jboss.org/pipermail/hibernate-dev/2015-July/013027.html
and HHH-9905. The map value is indeed not passed along anymore.

> But reading the spec again, it seems it only describes the
> "javax.persistence.validation.factory" key as means of passing the VF
> *to* JPA but not as means of obtaining it. Apparently that's just
> something that happened to be the case in WF before, comments at the
> test even states that this behaviour is not portable across
> containers.

I guess you are referring to JPA specs section 3.6.2 Providing the 
ValidatorFactory.
There it is quite clear that the map passed should be used to pass the instance
to the JPA provider. I guess as you suggest the question is whether 
a later call to 'entityManager.getEntityManagerFactory().getProperties()' is 
required
to expose the same properties as the ones passed to the factory creation.
Somehow, I would expect so, but I guess that is not explicitly expressed.

> So I suppose I'll have to rework that test in the course of the upgrade.

I guess that' the way to go.

--Hardy

Attachment: pgpRnK2EwOeoq.pgp
Description: PGP signature

_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to