db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig L Russell <Craig.Russ...@Sun.COM>
Subject Re: Cache invalidation
Date Mon, 06 Feb 2006 21:17:13 GMT
Hi Jörg,

Is this issue dead now?

I looked at the javadoc for these methods and they all refer to oid  
not pc.



On Feb 3, 2006, at 1:59 AM, Joerg von Frantzius wrote:

> 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

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!

View raw message