You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Armin Waibel <ar...@code-au-lait.de> on 2003/08/05 01:50:36 UTC

Re: Example usage of MetaObjectCachePerClassImpl

Hi Akhil,

> Hi,
>
> Can somebody (Armin ?) share an example of using
> MetaObjectCachePerClassImpl
>
> I did a search (not very exhaustive though) and found only one test
case:
> "org.apache.ojb.broker.ObjectCacheTests"
> which uses this cache but it does not demonstrate how to use...
>
> my queston is: where do we specify the which-class-uses-which-cache
> setting...
>

hmm, good question! Seems you need to cast to this implementation
(really bad) and use
public void setClassCache(Class objectClass, ObjectCache cache)

e.g.
cache = broker.serviceObjectCache();
((Meta....)cache).setClassCache(myClass, new
ObjectCacheDefaultImpl(null));
but there is no method to check if the cache already contains
'myClass' as key, thus it can be possible possible that I override
again and again.

> are we supposed to programmatically set it ?
>
> I did not find any code which would read a custom attribute from
> repository.
>

think this is a good idea to make this implementation
really useful. Are you willing to improve this implementation?

regards,
Armin

> Thanks in advance,
> Akhil Kumar
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org