Hi,
  If the data tables use a version column, you may consider an "optimistic"
mode i.e. run the transaction without *any* attempt to refresh() the data at
all. If the in-memory objects are out-of-date because the original database
records are modified in the interim, then the commit will fail. Only then
*retry* the transaction. However, "retry" can be a non-trivial exercise.
Assuming that a transaction can be successfully retried, such "optimistic"
approach will surely be more functional than trying to monitor *if* the data
have changed in the database. 

  I agree with Milosz on the point that if OpenJPA can develop a mechanics
that can monitor data modification using any database-specific technique and
accordingly invalidate in-memory caches, that will be a really useful
addition.




-----
Pinaki 
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/no-cache-direct-reads-from-db-each-time-tp5145973p5150735.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to