Community
Participate
Working Groups
This bug covers implementing support for Pessimistic locking support. See http://wiki.eclipse.org/index.php?title=EclipseLink/Development/JPA_2.0/pessimistic_locking for details
Updates have also been made to the names of the Optimistic Locking lock modes which should be supported within this bug.
*** Bug 250442 has been marked as a duplicate of this bug. ***
Created attachment 114828 [details] Proposed updates
Created attachment 115185 [details] Updated changes Updates to the wiki describing the enhancement coming soon ...
Created attachment 115287 [details] Updated patch Documentation has been updated as well on the wiki.
Patch has been submitted. Reviewed by: Gordon Yorke New tests: EntityManagerJUnitTestSuite - testWRITELock - testOPTIMISTIC_FORCE_INCREMENTLock - testOPTIMISTICLock - testPESSIMISTICLock - testPESSIMISTIC_FORCE_INCREMENTLock - testPESSIMISTIC_TIMEOUTLock - testRefreshOPTIMISTICLock - testRefreshPESSIMISTICLock AdvancedQueryTestSuite - testQueryREADLock - testQueryWRITELock - testQueryOPTIMISTICLock - testQueryOPTIMISTIC_FORCE_INCREMENTLock - testQueryPESSIMISTICLock ) - testQueryPESSIMISTIC_FORCE_INCREMENTLock - testQueryPESSIMISTICTIMEOUTLock
re-opening to the bug to re-visit/incorporate some changes and suggestions from James.
Created attachment 115982 [details] Updated patch
Created attachment 116064 [details] Updated patch with testing additions
Created attachment 116332 [details] New patch with a number of changes.
Patch has been submitted. Reviewed by: Gordon Yorke, James Sutherland New tests: AdvancedJPAJunitTest - testPessimisticLockingNamedQuery EntityManagerJUnitTestSuite - testLockingLeftJoinOneToOneQuery - testLockingLeftJoinOneToOneQuery2
Re-opening the bug to submit final changes to remove JPA 2.0 dependencies on core.
Created attachment 120717 [details] Code changes Remove JPA 2.0 dependencies on core
Changes submitted. No new functionality changes, simply removing the JPA 2.0 dependencies on internal core classes. Reviewed by: Gordon Yorke
Re-opening to add another patch
Created attachment 121154 [details] Update patch
Updated patch submitted. New JPA 2.0 test added: testPESSIMISTICLockWithNoChanges (commented out for check-in though pending JPA 2.0 test building changes) Reviewed by: Gordon Yorke
There are some issues with our MYSQL platform that should be resolved prior to closing this bug.
Should be fixed. Wait statements are not supported in MYSQL.
The JPA 2.0 Public Final Draft has changed the names of the enum values on LockModeType. They are now: public enum LockModeType { READ, WRITE, OPTIMISTIC, OPTIMISTIC_FORCE_INCREMENT, PESSIMISTIC_READ, PESSIMISTIC_WRITE, PESSIMISTIC_FORCE_INCREMENT, NONE } Things I believe we need to address: 1. There are various places in the ObjectLevelReadQuery that have the previous name values that need to be updated. 2. I understand the additional statics were added to avoid coupling with the JPA 2.0 version of LockModeType while shipping a JPA 1.0 implementation. If we need to keep these I believe its a better solution to set these up on a separate class. Multiple 'sets' of enum type statics on the same class makes code completion to use these less usable. 3. The Eclipse header for the ObjectLevelReadQuery should include a description of the additional functionality added with the bug #.
We should probably also capture in the javaDoc comments of QueryHints.PESSIMISTIC_LOCK and org.eclipse.persistence.config.PessimisticLock that as of JPA 2.0 there is a standard way to configure pessimistic locking and reference the new way using @see/@link refs.
Changed target from 1.1 to 2.0
Changing priority to P@ since JPA 2.0 features are required for the 2.0 release
*** Bug 274431 has been marked as a duplicate of this bug. ***
Created attachment 134652 [details] Update patch Patch to support the spec changes of LockModeType.
Patch submitted Reviewed by: Gordon Yorke Existing tests uncommented from the testing framework and new ones added to test the new lock mode types (PESSIMISTIC_READ and PESSIMISTIC_WRITE, spun from original PESSIMISTIC tests): EntityManagerJUnitTestSuite - testWRITELock - testOPTIMISTIC_FORCE_INCREMENTLock - testOPTIMISTICLock - testPESSIMISTIC_READLock - testPESSIMISTIC_WRITELock - testPESSIMISTIC_FORCE_INCREMENTLock - testPESSIMISTIC_READ_TIMEOUTLock - testPESSIMISTIC_WRITE_TIMEOUTLock - testRefreshOPTIMISTICLock - testRefreshPESSIMISTIC_READLock - testRefreshPESSIMISTIC_WRITELock AdvancedQueryTestSuite - testQueryREADLock - testQueryWRITELock - testQueryOPTIMISTICLock - testQueryOPTIMISTIC_FORCE_INCREMENTLock - testQueryPESSIMISTIC_READLock - testQueryPESSIMISTIC_WRITELock - testQueryPESSIMISTIC_FORCE_INCREMENTLock - testQueryPESSIMISTIC_READ_TIMEOUTLock - testQueryPESSIMISTIC_WRITE_TIMEOUTLock
Mass update to change fixed in target.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink