Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/JPA"

(EclipseLink JPA 2.0 Implementation Status)
(EclipseLink JPA 2.0 Implementation Status)
Line 25: Line 25:
 
|-
 
|-
 
| Cache Usage Settings || Assigned|| {{bug|277039}}, [[EclipseLink/Development/JPA_2.0/cache_usaged|Spec]] || Settings to allow fine grained control of second level cache usage.
 
| Cache Usage Settings || Assigned|| {{bug|277039}}, [[EclipseLink/Development/JPA_2.0/cache_usaged|Spec]] || Settings to allow fine grained control of second level cache usage.
|-
 
| Persistence Utils || Not Started || {{bug|281884}}, [[EclipseLink/Development/JPA_2.0/persistence_utils|Spec]] || This feature covers the implementation of the new PersistenceUtils helper interfaces.
 
 
|-
 
|-
 
| Undelimited Identifiers || Assigned || {{bug|000000}}, [[EclipseLink/Development/JPA_2.0/undelimited_identifiers|Spec]] || This feature covers specifying and processing metadata Identitfiers.
 
| Undelimited Identifiers || Assigned || {{bug|000000}}, [[EclipseLink/Development/JPA_2.0/undelimited_identifiers|Spec]] || This feature covers specifying and processing metadata Identitfiers.
 +
|-
 +
| Persistence Utils || Not Started || {{bug|281884}}, [[EclipseLink/Development/JPA_2.0/persistence_utils|Spec]] || This feature covers the implementation of the new PersistenceUtils helper interfaces.
 
|-
 
|-
 
| Pessimistic Locking Scope || Not Started || {{bug|280803}}, [[EclipseLink/Development/JPA_2.0/pessimistic_lock_scope|Spec]] || The new version of the specification provides a setting to extend pessimistic locking to certain relationships of the locked entity.
 
| Pessimistic Locking Scope || Not Started || {{bug|280803}}, [[EclipseLink/Development/JPA_2.0/pessimistic_lock_scope|Spec]] || The new version of the specification provides a setting to extend pessimistic locking to certain relationships of the locked entity.

Revision as of 10:21, 3 July 2009


EclipseLink JPA 2.0 Implementation Status

The EclipseLink project has been chosen to deliver the JPA 2.0 reference implementation as part of JSR 317. This page provides a summary of the work planned and the current status.

The following are features known to be required for JPA 2.0

EDR of JPA 2.0

Feature Status Links Description
MetaModel API Assigned bug 266912, Spec Runtime metamodel api implementation (without the APT based canonical metamodel work in bug 267391.
Criteria API Assigned bug 00000, Spec This will be an object oriented query construction api.
Validation Assigned bug 266927, Spec Through this feature EclipseLink JPA will integrate with the Validation APIs. (JSR-303)
EntityManager/Query API Assigned bug 00000, Spec Add support for the new EntityManager and Query APIs.
Cache Usage Settings Assigned bug 277039, Spec Settings to allow fine grained control of second level cache usage.
Undelimited Identifiers Assigned bug 000000, Spec This feature covers specifying and processing metadata Identitfiers.
Persistence Utils Not Started bug 281884, Spec This feature covers the implementation of the new PersistenceUtils helper interfaces.
Pessimistic Locking Scope Not Started bug 280803, Spec The new version of the specification provides a setting to extend pessimistic locking to certain relationships of the locked entity.
Properties Processing Not Started bug 000000, Spec The new version of the specification provides a means to dynamically specify properties on the EntityManager. The goal of this feature will be to define our properties processing and validation.
Jarfile URL Not Started bug 281887, Spec The specification has redefined the base for the jar-file url in the persistence.xml.
Typesafe MetaModel Generation (APT) Not Started bug 267391, Spec APT based canonical metamodel generation.
JPA 1.0 Compatibility Ongoing Spec Ensure that EclipseLink libraries with JPA 2.0 functionality will be able to run on JPA 1.0 compliant application servers.
1:1 JoinTable Not Started Spec
Schema/Catalog on SequenceGenerator Not Started Spec
JoinTable override Completed bug 278768, Spec JoinTable from association override support (metadata processing)
Uni-directional 1:M Completed bug 241414, Spec Provide EclipseLink functionality to support a uni-directional OneToMany mapping that does not use a join table. This mapping will be similar to EclipseLink's current AggregateObjectMapping.
Access Type Completed bug 241651, Spec Provide support for configurable access type
Pessimistic Locking Completed bug 248489, Spec Adding support for EntityManager APIs and functionality for Pessimistic locking
Nested Embedding Completed bug 207823, Spec Embedded objects can nest other embedded objects as well as being able to have relationships to entities.
Cache API Completed bug 248780, Spec Add support for the new Cache APIs.
New Collection Mappings Completed bug 48293, bug 265359, Spec Collections of embedded objects (aka Aggregate Collections) or of simple objects (Direct Collections)
Derived Identifiers Completed bug 241765, Spec Relationship mappings can be used as Id's or components of compound Id's directly without the need for separate primitive attributes.
Extended Map Support Completed bug 241410, Spec Maps can have keys and values that can be any of basic, entity, or embedded. These are stored in a target table or join table.
MappedById Completed bug 270011, Spec Derived Ids that are also defined in an embeddableid mapping
Orphan Removal Completed bug 249033, Spec When this option is set on a relationship if a child object is removed from the relationship it must be deleted.
TABLE_PER_CLASS Inheritance Completed bug 249860, Spec Add support for TABLE_PER_CLASS inheritance strategy. Optional feature from JPA 1.0
Entity Type Expressions Completed bug 000000, Spec JPA 2.0 QL has added syntax to allow restriction of query results by Entity Class type
Collection Params for IN Completed bug 252038, Spec IN() in JPQL can now accept a single collection parameter.
Ordered Lists Completed bug 249037, Spec Order of list is persisted to an "order column" when writes occur
Case Expressions Completed bug 252491, Spec Case style expressions have been introduce to JPQL and Criteria API
Standard Properties Completed bug 249023, Spec Add support for new javax.persistence properties.
JPQL Updates Completed bug 249224, Spec JPA 2.0 introduces certain JPQL updates that do not correspond to other features.

Bug Queries and Reports

Goals/Requirements

EclipseLink will introduce JPA 2.0 features with the following goals in mind:

  1. Remain a compliant JPA 1.0 implementation during the development of 2.0 functionality. This is a major requirement since we are working towards a 1.0 release of EclipseLink which must be JPA 1.0 compliant.
    • This generally means that the JPA 1.0 persistence.jar could be on the classpath and the product should function as expected
  2. Conform with the Eclipse IP process and rules. This means that the use of any updated persistence libraries and their source must come into the project through proper IP review procedures.
  3. All new features involving changes to JPA's ORM-XML schema must be reflected in Eclipse-ORM.XML. This should be done in such a way that changes during the evolution of the specification are minimized.
  4. Where possible any new features added for JPA 2.0 should also be available to users of the native EclipseLink ORM API and metadata. Accessibility through the native API can be limited to programmatic access and configuration.
    • EclipseLink users using JPA 1.0 will be able to access 2.0 preview functionality through native EclipseLink API or metadata


Types of Changes

The JPA 2.0 expert group is attempting to evolve this new specification to remain backwards compatible with JPA 1.0. The scope of its work will involve changes of various types with different effects on EclipseLink.

  1. Metadata Changes
    1. New Annotations
    2. New structures in the persistence.xml XSD
    3. New structures in the ORM.XML XSD
  2. API Changes
    1. New interfaces
    2. New methods on existing interfaces

Development Approach

We will be developing this functionality within the main product stream. Specification defined interfaces will be created and packaged within a javax.persistence_2.0 bundle/jar for users who wish to preview the functionality. To remain backward compatible with JPA 1.0 we will be packaging any interfaces we must link with for JPA 2.0 within the eclipselink JPA bundle/jar. As this bundle/jar will not contain the EMF API users will be required to choose their JPA version by using the appropriate persistence bundle/jar. Not bundling all the interfaces allows us to produce a single EclipseLink JPA bundle/jar while alleviating the concern of user's hitting preview code when they do not expect to.

Class file to be included in EclipseLink JPA bundle

  • javax.persistence.Cache
  • javax.persistence.Access
  • javax.persistence.AccessType
  • javax.persistence.LockModeType
  • javax.persistence.LockTimeoutException
  • javax.persistence.PessimisticLockException

Metadata Changes

The following changes need to be handled keeping the backwards compatibility to JPA 1.0 goals in mind:

  • New Annotations
  • Modified Annotations
  • Changes to the XML Schemas
  • new Interfaces
  • reference to new interfaces