users@glassfish.java.net

Re: caching in TopLink

From: <glassfish_at_javadesktop.org>
Date: Mon, 18 Aug 2008 08:27:44 PDT

Hello,

I'm not sure how you are seeing that when the cache is hit, updateAccess is not called. If the query goes to the shared ServerSession cache, it should cause the updateAccess method to be called. Also, any changed objects will be accessed when the transaction is commited.

When the shared cache is not used for a query, the updateAccess method obviously cannot be called on the objects cache key. This will generally occur when executing queries after a flush, updateall or native sql update statement - when ever a statement is excuted that would prevent TopLink from placing results in the shared cache (since these should only go into the shared cache on commit).

Hope this helps,
Chris
[Message sent by forum member 'chris_delahunt' (chris_delahunt)]

http://forums.java.net/jive/thread.jspa?messageID=293949