Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EclipseLink/Development/JPA 2.0/pessimistic locking"
(New page: = Lock Modes / Pessimistic Locking = JPA 2.0 Root | [http://bugs.eclipse.org/248489 Enhancement Request] ==Issue Summary== In JPA 2.0 the specificat...) |
|||
Line 11: | Line 11: | ||
Optimistic Lock Modes will be a straight translation of existing modes. | 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. | Pessimistic Lock Modes will require pessimistic locking support be added to the EntityManager and Query. | ||
+ | Lock Timeout hint will also be supported | ||
===Open Issues=== | ===Open Issues=== |
Revision as of 11:56, 25 September 2008
Contents
Lock Modes / Pessimistic Locking
JPA 2.0 Root | Enhancement Request
Issue Summary
In JPA 2.0 the specification extends Entity Manager lock mechanism to include explicit support for pessimistic locking.
See JPA 2.0 ED section 3.4.3 and 3.4.4 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. Lock Timeout hint will also be supported
Open Issues
Will Target table mappings (uni-directional OneToMany, ElementCollections) require that target rows also be locked?
Important Notes
- Pessimistically locked object with version must still have version updated when entity is updated.
Work Required
- Develop model for testing access type settings
- approx 2 days
- Update Processing to process entire table
- approx 2 days - optimistic modes
- approx 3 days - pessimistic modes