Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

EclipseLink/Development/JPA 2.0/entitymanager updates

< EclipseLink‎ | Development‎ | JPA 2.0
Revision as of 15:17, 26 September 2008 by Gordon.yorke.oracle.com (Talk | contribs) (New page: = Updated EntityManager / Query APIs = JPA 2.0 Root | [http://bugs.eclipse.org/248491 Enhancement Request] ==Issue Summary== In JPA 2.0 the specific...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Updated EntityManager / Query APIs

JPA 2.0 Root | Enhancement Request

Issue Summary

In JPA 2.0 the specification extends EntityManager and Query APIs. New APIs have been added for locking, getting supported properties and getting the owning Entity Manager Factory.

A new operation 'clear' was also added including a new Cascade Type. Calling clear on an Entity allows the user to remove an Entity and cascaded related entities from the persistence context. Effectively an unregister call.

See JPA 2.0 ED section 3.1.1 and 3.2.6 for details.

General Solution

This feature requires adding support to EntityManager and Query to allow a user to supply new LockModeTypes and comply with the specification defined behaviour. Pessimistic Locking and Optimistic Locking LockModesTypes will be covered. Optimistic Lock Modes will be a straight translation of existing modes. Pessimistic Lock Modes will require pessimistic locking support be added to the EntityManager and Query.

Open Issues

Will Target table mappings (uni-directional OneToMany, ElementCollections) require that target rows also be locked?

Important Notes

  1. Pessimistically locked object with version must still have version updated when entity is updated.

Work Required

  1. Develop model for testing access type settings
    approx 2 days
  2. Update Processing to process entire table
    approx 2 days - optimistic modes
    approx 3 days - pessimistic modes

Back to the top