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 suggestion. Comments? -- View this message in context: http://www.nabble.com/datacache-tp17326391p17501042.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.