Community
Participate
Working Groups
Right now we only have one persistence unit defined in persistence.xml for running JPA tests on server, we need to support defining multiple persistence units in persistence.xml to be able to run multiple persistence units tests on server.
The changes in the fix are: 1. add 4 more server test runner beans named TestRunner1Bean.java, ... TestRunner4Bean.java associated with related remote interfaces under <trunk>/jpa/eclipselink.jpa.test/resource/server. Each test runner bean has its specfic persistence unit 2. change <trunk>/jpa/eclipselink.jpa.test/build.xml to add these multiple sessionbeans to test model which has multiple persistence units, our regular one persistence unit test models won't be affected, those models still use TestRunnerBean.java 3. add (unitName="%%puName%%") to @PersistenceContext and @PersistenceUnit annotations for our existing TestRunnerBean.java, otherwise we will get "...Entity is not known entity type" error when running multiple persistence units tests on server. 4. add persistence.xml and cacheable-entity-mappings.xml for cacheable test model.
Created attachment 166539 [details] add multiple persistence units to jpa server test framework
Created attachment 166628 [details] updated the patch with new build.xml and persistence.xml
modify the TestRunner(1..4)Bean to share one interface TestRunner, make TestRunner(1..4)Bean to be subclasses of TestRunnerBean.java with override getPersistenceUnitName() method. The fix has been checked in trunk as revision 7137, code is reviewed by Edwin Tang, James Sutherland and Kevin Yuan.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink