Persistence Services for GlassFish Server Open Source Edition 3.1 1.2. Name(s) and e-mail address of Document Author(s)/Supplier: Mitesh Meswani: mitesh.meswani@oracle.com 1.3. Date of This Document: 05/19/2010 2. Project Summary 2.1. Project Description: Persistence Services requirements for GlassFish Server Open Source Edition 3.1 include following
- Upgrade EclipseLink to v2.1
- Provide better developer experience for Embedded use case
- Rename sun-* deployment descriptor for cmp to glassfish-*
2.2. Risks and Assumptions: Assumptions
- EclipseLink 2.1 will be available in time frame suitable for GlassFish Server Open Source Edition 3.1 (currently scheduled to be release on 06/23)
- It would be possible to use mechanism defined in section 4.1.2 below to define datasource dynamically while running in embedded mode.
3. Problem Summary 3.1. Problem Area: Provide persistence services for V3.1 3.2. Justification: Persistence is core component of GlassFish. 4. Technical Description: 4.1. Details: 4.1.1 Upgrade EclipseLink to v2.1 GlassFish V3 ships with EclipseLink 2.0. EclipseLink 2.1 contains many bug fixes to 2.0 and also implements advanced ORM/query features. We will integrate milestones from 2.1 stream as they are released. 4.1.2 Provide better developer experience for Embedded use case While instantiating a Persistence Unit, if a jdbc resource is not specified in persistence.xml, it is defaulted to "jdbc/_default". This resource points to Derby running in network mode. Using it would require developer to have a Derby instance running in network mode. To facilitate better experience while unit testing etc, While running in embedded mode, we will change the default to jdbc resource pointing to embedded instance of Derby. We have two options for the resource that we can point to:
- We already have an embedded jdbc resource ("jdbc/_TimerPool")defined for ejb timers. We can reuse that or
- Dynamically define a new jdbc resource "jdbc/_embedded_default" which points to a dynamically defined connection pool pointing to embedded derby and use that.
While option (1) above is convenient to implement, it might introduce some subtle behavior changes to code running in embedded mode in comparison to code running in full mode hence we will go with Option (2) We will use CommandRunner to execute create-jdbc-connection-pool and create-jdbc-resource respectively. 4.1.3 Rename sun-* deployment descriptor for cmp to glassfish-* cmp code needs to be upgraded to interpret glassfish-* deployment descriptors. 4.2. Bug/RFE Number(s): 4.3. In Scope:
- Features described above
- On going maintenance to persistence code
4.4. Out of Scope:
- Any features not mentioned above
4.5. Interfaces: 4.5.1 Public Interfaces interface : javax.persistence (ver 2.0) comments : From JSR 317 4.5.2 Private Interfaces None identified at this time 4.5.3 Deprecated/Removed Interfaces: None identified at this time 4.6. Doc Impact: Docs will need to explain the default datasource used while running in embedded mode. 4.7. Admin/Config Impact: None anticipated 4.8. HA Impact: None anticipated 4.9. I18N/L10N Impact: None anticipated 4.10. Packaging, Delivery & Upgrade: 4.10.1. Packaging The current packaging structure should suffice for these changes. 4.10.2. Delivery The current delivery mechanism should suffice for these changes. 4.10.3. Upgrade and Migration: No impact anticipated. 4.11. Security Impact: None anticipated. 4.12. Compatibility Impact None anticipated. 4.13. Dependencies: 4.13.1 Internal Dependencies
- Changes to Connector module for @DSD and to allow definition of a datasource dynamically
4.13.2 External Dependencies
- EclipseLink V2.1 released under EDL.
4.14. Testing Impact:
- Existing tests from V3 will be resused to check for potential regression with new version of EclipseLink
- New automated tests will be developed with SQE to test support for @DSD and new default for Embedded mode.
5. Reference Documents:
6. Schedule: 6.1. Projected Availability: See the project page here
|