db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg von Frantzius <joerg.von.frantz...@artnology.com>
Subject Cache invalidation
Date Fri, 03 Feb 2006 09:59:29 GMT
Hello JDO developers,

in our system we have several VMs that operate on the same database via 
JDO. We're performing distributed cache invalidation via our own 
notification mechanism, which effectively calls 
PMF.getDatastoreCache().evict() and PM.evict(). The problem here is that 
either evict() accepts only PC objects, not object ids, so we have to 
call PM.getObjectById() beforehand. If no object for that id was 
present, we're instantiating a hollow object here only to discard it 
afterwards, that's not very effective.

As we really want cache invalidation here, not eviction, this is even 
worse. For this purpose, it would be far more convenient to have some 
method like invalidateCachesFor(Object id) on PersistenceManagerFactory. 
To make our wish complete ;) this method would transition all 
non-transactional instances to hollow for that id, for all the PMs the 
PMF has given out. All transactional objects with that id should be 
transitioned to hollow after their transaction has completed (either 
with commit or rollback).

Or is there some other way to achieve the same effect?

Thanks for any comments,

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message