[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] JPA caching of ResultSets only?
|
How do we unsubscribe?
-----Original Message-----
From: polyphenol@xxxxxxxxxxxx [mailto:polyphenol@xxxxxxxxxxxx]
Sent: Wednesday, September 28, 2011 3:00 AM
To: Guy Pelletier; EclipseLink User Discussions
Subject: Re: [eclipselink-users] JPA caching of ResultSets only?
Hi Guy.
good idea but sadly it seems impossible to use hints with
EntityManager.persist.
My current brute force solution is:
#
# manager.getTransaction().begin();
# manager.persist(xyz);
# manager.getTransaction().commit();
#
# manager.refresh(xyz);
#
I only have one location with persist and many locations performing
different queries.
Polyphenol
On Tue, 27 Sep 2011 14:13:48 +0200 Guy Pelletier
<guy.pelletier@xxxxxxxxxx> wrote:
>Hi Polyphenol,
>
>You can achieve this with the following query hints:
>
>- javax.persistence.cache.retrieveMode
>- javax.persistence.cache.storeMode
>
>Which accept the following JPA enums
> - CacheStoreMode (USE, BYPASS, REFRESH)
> - CacheRetrieveMode (USE, BYPASS)
>
>Cheers,
>Guy
>
>On 27/09/2011 5:15 AM, polyphenol@xxxxxxxxxxxx wrote:
>> Is it possible to configure EclipseLink so that:
>>
>> 1) commits to the DB aren't cached
>> and
>> 2) reads from the DB are cached?
>>
>>
>> Background:
>> I have a table where some columns are filled by the DB server
>via
>> triggers. With caching enabled EclipseLink doesn't fetch those
>if
>> the rows are still in the cache and thus returns invalid values.
>> Caching for this table is otherwise correct and very useful.
>>
>> Polyphenol
>>
>> _______________________________________________
>> eclipselink-users mailing list
>> eclipselink-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users