Manik Surtani
Fri, 18 Jul 2008 02:54:49 -0700
On 17 Jul 2008, at 22:59, Brian Stansberry wrote:
Hmm, good point. Potentially also Session.refresh(...), although I'm not sure if the implementation of that method skips the 2LC and goes right to the db.Paul Ferraro wrote:After thinking this through, the only scenario I can think of where the2LC would be subject to a repeated read is after a session cache eviction (i.e. via Session.clear() or Session.evict(...)). WithoutREPEATABLE_READ isolation on the 2LC, any subsequent request withing the same transaction for an evicted entity could return an updated value, ifthe cache was updated by a concurrent request.
You'd need to check with Steve on this, but to the best of my knowledge, once a session has started, it copies stuff to a "first- level cache" which is a Map associated with the session. A Session.clear()/evict() would only flush the 2LC, the 1LC would still be intact to provide R_R to the caller. Although it does sound a bit odd that a clear() or evict() won't affect 1LC and go straight to 2LC, so I could be wrong. :-)
Cheers, Manik -- Manik Surtani Lead, JBoss Cache [EMAIL PROTECTED] _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev