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,
Jörg


Reply via email to