I could use a per-broker cache but i don't think
this will solve my problem.

Imho, per-broker cache does not work with anonymous fields because
the cache is stored within the anonymous field descriptors, which are
common to all brokers (i think).
Maybe the cache should be responsible for anonymous keys ?

For the moment, i think i will patch the anonymous field descriptor
to add a clearCache method and iterate through the class descriptors
to clear all anonymous keys caches, but this is not a very
pretty solution.

Guillaume


-----Message d'origine-----
De : Brian McCallister [mailto:[EMAIL PROTECTED]
Envoy� : mercredi 21 avril 2004 15:34
� : OJB Users List
Objet : Re: Problem with clearing cache


I would tend to say that using anonymous primary keys and clearing the
cache are mutually exclusive operations, unfortunately, as the cache is
where the primary keys are stored.

Is using a per-broker cache an option? If so you will effectively have
the cache cleared every time you obtain a new broker/close a broker.

-Brian

On Apr 21, 2004, at 8:52 AM, Guillaume Nodet wrote:

> I thought i could replace the default implementation
> of persistend field with my own, but i saw no way
> of doing this for anonymous fields. Why is this class
> not configurable along with the other ones in the
> ojb configuration file ? I know my needs may be
> very specific, but ...
>
> Cheers
>
> Guillaume Nodet
>
> -----Message d'origine-----
> De : Guillaume Nodet [mailto:[EMAIL PROTECTED]
> Envoy� : mercredi 21 avril 2004 14:42
> � : OJB Users List
> Objet : Problem with clearing cache
>
>
> I need to clear the ojb cache at some point in my program
> (namely after deleting all data in the database).
> The problem i have is that i use anonymous primary keys and
> the caches associated with the anonymous fields are not cleared.
> Would it be possible to had some mean of clearing these caches ?
>
> The problem is that at some time, i've got errors when inserting
> objects. I think that the key for the failing object is in cache
> but not in the database so when a foreign key references it,
> the insertion fails.
>
> Thanks,
> Guillaume Nodet
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to