[hibernate-issues] [Hibernate-JIRA] Created: (HHH-4736) Cannot pass ValidatorFactory into PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
Mike Youngstrom (JIRA)
noreply at atlassian.com
Wed Dec 23 14:57:29 EST 2009
Cannot pass ValidatorFactory into PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map)
-------------------------------------------------------------------------------------------------------------------
Key: HHH-4736
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4736
Project: Hibernate Core
Issue Type: Bug
Components: entity-manager
Affects Versions: 3.5.0-Beta-2
Reporter: Mike Youngstrom
The javadocs for PersistenceProvider.createContainerEntityManagerFactory(PersistenceUnitInfo, Map) says:
If a Bean Validation provider is present in the classpath, the container must pass the ValidatorFactoryinstance in the map with the key "javax.persistence.validation.factory".
However, all non string values are stripped from the provided Map by Ejb3Configuration.configure(PersistenceUnitInfo, Map):463, ConfigurationHelper.overrideProperties() making it impossible to pass a ValidatorFactory using the "map". Passing a ValidatorFactory into PersistenceProvider.createEntityManagerFactory(String, Map) works fine since Ejb3Configuration.configure(String, Map) doesn't strip all non Strings from the map.
As a work around it appears a ValidatorFactory can be passed into the properties of the PersistenceUnitInfo.
Thanks,
Mike
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list