db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Armin Waibel" <ar...@code-au-lait.de>
Subject [ObjectCache] per class/ per database setting introduced
Date Thu, 18 Sep 2003 00:21:52 GMT
Hi all,

add support for per class and per jcdAlias ObjectCache
declaration (thanks Matthew and Oleg for support).
This was recently a frequently asked "feature".
Now it is possible to specify a ObjectCache
implementation with a new introduced element
'object-cache' (intern mapped to ObjectCacheDescriptor)
on jdbc-connection-descriptor level and class-descriptor
level. ObjectCache implementation specific
properties can be passed by using the 'attribute' element, e.g.

          <attribute attribute-name="timeout" attribute-value="2000"/>


To be compatible with current versions of OJB, the
ObjectCache [OC] declaration in OJB.properties file is also
valid. In OJB.properties file the 'standard/default' cache
is declared.
The priority of the different declaration levels are
per class > per jcdAlias > standard ObjectCache (OJB.properties)

Further on I introduced a new property 'descriptorBasedCaches'
in OJB.properties. It's a little bit hard to explain why we need
this - maybe I'm wrong, or someone can find a smarter solution.

OJB allows to change metadata at runtime (currently it's possible
to switch between different DescriptorRepository). Thus for
one class (with two different class-descriptor) two different
ObjectDescriptors can be declared. But by default class name is used to
map ObjectCache instances declared on class-descriptor level
--> second OC override the first OC implementation.
If 'descriptorBasedCaches' is set 'true', the ObjectCacheDescriptor
instance itself is used as key to find a per class OC implementation.
This makes it possible to use different OC instances for the same
But I'm not sure if we really need this?

Will check in updated docs in near future ;-)


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

View raw message