Re: How to release cached objects ?

Armin Waibel <[email protected]>
Newsgroups gmane.comp.jakarta.ojb.user
Message-ID <[email protected]>
Hi Bruno,

Bruno CROS wrote:
> Hi,
> 
> Just about a little question.
> 
> Does PersistenceBrokerFactory.releaseAllInstances() release all cached
> objects?
> 
> I'm using PersistenceBrokerFactoryDefaultImpl and ObjetCacheDefaultImpl 
> (and
> OJB 1.0.4.)
> 
> The goal is to force server to reload all OJB mapped objects. Is there a
> proper foreseen method to call to do this?
>

Evict all caches:

PB.clearCache()

or

PB.serviceObjectCache().clear()

With
PersistenceBrokerFactory.releaseAllInstances()

you will release all pooled PB instances and reset the the PB pool.

regards,
Armin

> Thanks a lot.
> 
> Bruno
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.