openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: datacache
Date Tue, 27 May 2008 22:00:20 GMT

After some more analysis of refresh() issue...

1. it is observed that a refresh of a single, clean instance never hits the
database -- irrespective of whether Data Cache is active or not. That does
not appear spec compliant. 

2. refresh() behaves differently on current lock level. With NO LOCK it
reads from Data Cache; on any stronger lock it hits the database.
I am of the opinion that all refresh() must bypass data cache altogether
always -- because refresh() seems to express explicit intent of the user to
read data from database (say when the application thinks that out-of-band
modifications may have taken place on the database).

3. There is an 'optimization' on BrokerImpl.refresh() -- one for a single
entity and other for a collection. Removing that optimization (which leaves
some maintenance concern of similar but not same code blocks) is another


View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message