Community
Participate
Working Groups
Build Identifier: 2.2.0 When two persistence providers are in the classpath and you specify no persistence provider in the persistence.xml, but specifiy the other persistence provider (not eclipselink) via the javax.persistence.provider property in the map passed to Persistence.createEntityManagerFactory(...) then eclipselink will feel responsible for that persistence unit, but according to Chapter 9.2 of the JPA 2 spec this should not be the case. Reproducible: Always Steps to Reproduce: 1. Have eclipselink in the classpath 2. Create a persistence unit with no persistence provider specified 3. Call Persistence.createEntityManagerFactory with a map containing a key "javax.persistence.provider" with a value other than org.eclipse.persistence.jpa.PersistenceProvider Eclipselink will create an EntityManagerFactory for that persistence unit.
From looking at the source I think this should be fixed in JPAInitializer.isPersistenceProviderSupported(...) which should get the map as second parameter and test for the "javax.persistence.provider" property.
Setting target and priority. See the following page for the meanings of these fields: http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines Community: Please vote for this bug if it is important to you. Votes are one of the main criteria we use to determine which bugs to fix next.
Deferring to next patch release.
Created attachment 220897 [details] Patch
Patch checked in. Reviewed by Tom Ware
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink