On Saturday 11 Jan 2014 09:06:19 Dan Haywood wrote:
> On 10 January 2014 18:41, Andy Jefferson <[email protected]> 
wrote:
> > > Basically, I think it amounts to rebuilding the metamodel for the
> > > changed
> > > class(es).  In Isis I already have such an API [2], but is there
> > > anything
> > > similar in DataNucleus?
> > 
> > it would be to reload the
> > PMF/EMF when metadata/class files change, and when a persistence 
class
> > changes
> > then flush cache entries.
> 
> In Isis the PMF is held (in effect) globally [1].  So if I basically throw
> away the old PMF and recreate, would that be sufficient?
> I guess the bit I'm querying is "flush cache entries".  What does that 
mean
> if I have a new PMF?

Sufficient if you're happy with blowing away the persistence context and 
starting again. I think the JRebel plugins for other persistence providers 
cater for 2 situations : the one you're thinking of, and also where a 
persistence class (only) is being reloaded. This second one is where the 
cache needs flushing of all instances of the old version of that class (so 
PM/EM should likely call flush() and then call evictAll() on the L1 cache).


-- 
Andy
DataNucleus (Web: http://www.datanucleus.org   Twitter: @datanucleus)

Reply via email to