If you're using Oracle DB you can also use a returning policy to
efficiently retrieve the values of the columns written by the
triggers so that your cache is up to date.
http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_(ELUG)#Using_EclipseLink_JPA_Extensions_for_Returning_Policy
Shaun
On 27/09/2011 8:13 AM, Guy Pelletier 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
--
Shaun Smith | Principal Product Manager
Phone: +1.905.502.3094 | Mobile: +1.416.558.6244
Oracle Fusion Middleware, TopLink
ORACLE Canada | 100 Milverton Drive, Mississauga, Ontario | L5R
4H1
Oracle is committed to developing practices and
products that help protect the environment
|