Functional Specification: Dali Support for EclipseLink Caching and Optimistic Locking
bug 239137 - cache support
bug 239148 - optimistic locking support
|Date||Author||Version Description & Notes|
This feature covers entity/mapped superclass level caching and optimistic locking supported by the EclipseLink JPA extension.
- Add JPA Details view widgets for the Cache, ExistenceChecking, OptimisticLocking annotations
- Add JPA Details view widgets for eclipselink-orm.xml cache, existence-checking and optimistic-locking elements
- Provide the appropriate defaults and validation for these settings
Present any concepts relevant to the feature.
Requirements / Functionality
- @Cache supported in Entity and MappedSuperclass classes.
- Cache Type options
- Default (Weak with Soft subcache)
- Weak with Soft Subcache -> CacheType.SOFT_WEAK
- Weak with Hard Subcache -> CacheType.HARD_WEAK
- Weak -> CacheType.WEAK
- Soft -> CacheType.SOFT
- Full -> CacheType.FULL
- Cache -> CacheType.CACHE - do we want to support this?? We didn't in the mapping workbench
- None -> CacheType.NONE
- Coordination Type
- Default (Send Object Changes)
- Send Object Changes
- Invalidate Changed Objects
- Send New Objects with Changes
- @ExistenceChecking supported in Entity and MappedSuperclass classes.
- Default (Check Cache)
- Check Cache -> ExistenceType.CHECK_CACHE
- Check Cache then Database -> ExistenceType.CHECK_DATABASE
- Assume Existence -> ExistenceType.ASSUME_EXISTENCE
- Assume Non-Existence -> ExistenceType.ASSUME_NON_EXISTENCE
Entity 'Caching' section
For reference, 'Caching' tab from the MW
For reference, 'Refreshing Cache Options' section from the MW
- @OptimisticLocking supported in Entity and MappedSuperclass classes.
- Type Options
- Default (Version Column)
- All Columns -> OptimisticLockingType.ALL_COLUMNS
- Changed Columns -> OptimisticLockingType.CHANGED_COLUMNS
- Selected Columns -> OptimisticLockingType.SELECTED_COLUMNS
- Version Column -> OptimisticLockingType.VERSION_COLUMN
- Type is 'Selected Columns' but no columns are selected
- Selected Columns must be mapped and must not be primary keys
- If using Optimistic Locking with anything other than Version Column, the @Version annotation will be ignored (warning, not error, for this)
- If Cascade is set and type is not Version Column, warning that it is not supported.
Option 1 for Optimistic Locking section
Option 2 for Optimistic Locking section
- None is chosen if no @Version annotaiton on an attribute and no @OptimisticLocking on the Entity
- Default (Version Column) is chosen if @Version exists on an attribute and @OptimisticLocking does not exist on the Entity
- Choose a Column under Version Column or Default(Version Column) and the @Version annotation will be added to the attribute that corresponds to that Column and removed from other attributes
For Reference, Locking tab from MW
This section lists the open issues that are still pending that must be decided prior to fully implementing this project's requirements.
|Issue #||Owner||Description / Notes||Decision|
During the research for this project the following items were identified as out of scope but are captured here as potential future enhancements. If agreed upon during the review process these should be logged in the bug system.