Search code examples
javajpacachingeclipselink

Eclipse link shared vs protected cache


The protected cache option allows for shared objects to reference isolated objects. Setting the cache isolation to PROTECTED for an entity enables its shared cache. The protected option is mostly the same as the shared option, except that protected entities can have relationships to isolated entities, where as shared can not.

what is the meaning of this exception. does this make the isolated entity shared if they have relationship with protected entity


Solution

  • Protected option can be used to ensure read-only entities and queries always copy the cached objects. So you can simulate a data cache with EclipseLink. while shared ready-only will not be copied.