Skip to main content

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.

Jump to: navigation, search

EclipseLink/DesignDocs/232063

Design Specification:
     Relationships between non-Cachable and Cachable Entities

ER 232063

Document History

Date Author Version Description & Notes
2010/05/27 Gordon Yorke Initial creation of this doccumentation

Project overview

Goals:

  • Relationships between JPA 2.0 Cachable(false) and Cachable(true) Entities should be supported

Concepts

Currently EclipseLink uses the Isolated Cache functionality to provide @Cacheable(False) requirements. The Isolated Cache functionality was created with security as a primary requirement and Isolated Entities were not allowed to reference Shared Cache Entities. Transitioning Isolated Caches to the JPA 2.0 @Cacheable() requirements means this functionality must adapt and be more flexible as @Cacheable(true) Entities must be able to reference @Cacheable(false) Entities.

Requirements

  • Transparent support for relationships from @Cacheable(true) to @Cacheable(false).
  • Separate Isolated configuration from @Cacheable(false)
  • Behaviour of @Cacheable(false)
    • Instances will be maintained within a Weak Identity Map.
      • This will ensure 'Read-Only' entities can be built and maintain referential integrity.
    • Any instance read through or registered within a EM/Persistence Context will be "refreshed" to the latest data before being returned to the user.

EclipseLink JPA Metadata

  • There is no new Metadata

High Level Design

  1. ForeignReferenceMappings will track when they reference @Cacheable(false)
    • This information will be used during registration with the Persistence Context to ensure the @Cacheable(false) Entities are reloaded from the database.
  1. For Shared Cache and Read-Only Entities @Cacheable() will be treated separately from isIsolated.

Design / Functionality

Design Notes

Testing

API

Config files

Documentation

Open Issues

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

Decisions

This section lists decisions made. These are intended to document the resolution of open issues or constraints added to the project that are important.

Issue # Description / Notes Decision

Future Considerations

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.

Back to the top