Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] How to set devault behavior of cach synchronisation

<property name="eclipselink.cache.shared.default" value="false" />

Should do it for you.

./tch



On Sun, Jan 17, 2010 at 12:46 PM, Martin Berner
<Martin.Berner@xxxxxxxxxxxx> wrote:
> Hello,
> I whant to ensure that the shared cach are informed of an update of en
> entity from the session cach.
>
> When I set the following hints to select the Objects, it works as I want it:
> List l =
> entityManager.createQuery(query.toString()).setHint(QueryHints.REFRESH,
> HintValues.TRUE).getResultList()
>
> Or with querryByExample:
>         ReadAllQuery query = new ReadAllQuery();
>         query.setExampleObject(tmpEntity);
>         query.cacheQueryResults();
>         query.refreshIdentityMapResult();
>         query.setCacheUsage(ReadAllQuery.DoNotCheckCache);
>         Session s =
> ((org.eclipse.persistence.jpa.JpaEntityManager)entityManager.getDelegate()).getSession();
>         List l = s.executeQuery(query);
>
> Is there a PArameter to set in the persistenc.xml or a parameter to set in
> the parametermap to create an Entitymanagerfactory or Entitymanager?
>
> What I want is that by default by updateing an Entity the shared cach are
> informed of invalid old Object.
> We have lot of PL/SQL Procedures runing on the Database, changing Data. So
> Default behavior of selecting woult be selecting the Objects vrom the
> database.
> And only some special Entitys dosent have to by selected ignoring the cach.
>
> How can I do thes?
>
> Sorry of my bad english.
>
> best regards
> Berner Martin
>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
>
>


Back to the top