Hello Adam,
You may be confusing the Persistence Context with a cache?
Sometimes the UnitOfWork which is the implementation of the Persistence
Context in TopLink is described as a cache to explain some of its
behaviours but its behaviour is beyond that of a cache. Because the
Unit0fWork must track all objects that were ever read through or
registered by the UnitOfWork to full its behavioural requirements the
TopLink cache settings do not apply.
--Gordon
Adam Bien wrote:
> Hi All,
>
> TopLink cache consists of two parts:
> 1. Client/L1
> 2. Shared/L2
>
> Is it possible to configure them independently? In the TopLink
> reference there are two sections:
>
> http://www.oracle.com/technology/products/ias/toplink/jpa/resources/toplink-jpa-extensions.html#BABGDJBC
>
>
> It seems like the @Cache annotation addresses the Client/L1 cache. The
> properties (
>
> eg. <property name="toplink.cache.type.Order" value="Full"/>) the L2.
>
> Is it possible to configure both caches using the persistence.xml
> properties?
>
> I would like to configure Weak Caches for both levels, however it
> seems like the L1 cache is still "Full" (or it uses "hard" references
> to entities)
>
> thank you in advance!,
>
> adam bien
>