|Re: [eclipselink-dev] Bug 328404 - JPA Persistence Unit Composition|
The patch is ready for review. https://bugs.eclipse.org/bugs/show_bug.cgi?id=328404Added support for connection properties for composite member persistence unit.
In the same way as PersistenceUnitProperties.COMPOSITE_UNIT_PROPERTIES used to pass member-specific properties to createEMF method now is possible to pass connection properties (to be processed by members) to createEM method.
Tests are in composite.advanced.EntityManagerJUnitTestSuite: testConnectionPolicy; testConnectionPolicySetProperty; testNonPooledConnection; testExclusiveIsolatedLeaksConnectionOnClear. Thanks, Andrei On 5/11/2011 11:08 AM, Andrei Ilitchev wrote:
Checked Patch Eclipse jpa tests launch files into trunk. Test only patch: added to Eclipse jpa test launch files composite models' jars. Thanks, Andrei On 5/10/2011 9:03 PM, Andrei Ilitchev wrote:Patch for composite member using sessions.xml A simple patch in EntityManagerSetupImpl class: composite persistence unit always uses its puName as session name. However SESSION_NAME specified in properties should be used to read correct session from sessions.xml. Checked the patch into trunk. On 5/9/2011 3:08 PM, Andrei Ilitchev wrote:Correction to static weaving patch is ready for review. - Following Tom's review introduced a new class to be passed to EntityManagerSetupImpl (instead of StaticWeaveClassTransformer); - Corrected problem with static weaving in case sessions.xml is used. Thanks, Andrei On 5/4/2011 5:39 PM, Andrei Ilitchev wrote:Checked patch to fix composite persistence unit static weaving into trunk. EntityManagerSetupImpl.predeploy method now used for static weaving, too. In this case StaticWeaveClassTransformer is set into emSetupImpl to indicate that predeploy will be used for static weaving, also passes logging parameters. Also fix to allow persistebce unit to read sessionBroker from sessions.xml. Note that such persistence unit is NOT a composite. Code review by Tom is pending. Thanks, Andrei On 4/27/2011 3:43 PM, Andrei Ilitchev wrote:Reviewed by James. Checked in the updated patch into trunk. If a bunch of new tests fail with connection exceptions, make sure to specify property single.db=true in your test.properties file or system properties. In that case all composite members will use the same default data base. Otherwise specify db2.* and db3.* properties. For details see eclipselink.jpa.test\test.properties and / or org.eclipse.persistence.testing.framework.junit.JUnitTestCaseHelper class. The new tests are: org.eclipse.persistence.testing.tests.jpa.composite.advanced.EntityManagerJUnitTestSuite and org.eclipse.persistence.testing.tests.jpa.xml.composite.advanced.EntityMappingsAdvancedJUnitTestCase The latter test could run with to different persistence units (using the same classes): "xml-composite-advanced" and "xml-extended-composite-advanced" (which uses eclipselink-orm.xml). By default "xml-composite-advanced" is used. Specify -Dorm.testing=eclipselink to use "xml-extended-composite-advanced". Note that because both pus use the same classes they should never both appear on the same classpass. "xml-composite-advanced" defined in eclipselink-xml-composite-advanced-model.jar and has members eclipselink-xml-composite-advanced-model-member_1.jar eclipselink-xml-composite-advanced-model-member_2.jar eclipselink-xml-composite-advanced-model-member_3.jar "xml-extended-composite-advanced" defined in eclipselink-xml-extended-composite-advanced-model.jar and has members eclipselink-xml-extended-composite-advanced-model-member_1.jar eclipselink-xml-extended-composite-advanced-model-member_2.jar eclipselink-xml-extended-composite-advanced-model-member_3.jar Usually the default one ("xml-composite-advanced") is run with all other tests in TestingBrowser (CMP3TestAllRunModel) or FullRegressionTestSuite and the extended one is run separately. On 4/26/2011 6:50 PM, Andrei Ilitchev wrote:https://bugs.eclipse.org/bugs/show_bug.cgi?id=328404 The patch is ready for review. Please send any feedback you may have. The corresponding document http://wiki.eclipse.org/EclipseLink/DesignDocs/328404_new will be extended shortly. Thanks, Andrei _______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev_______________________________________________ eclipselink-dev mailing list eclipselink-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
Back to the top