db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: RFC: Multi-Level Timeouts for Default Cache
Date Fri, 24 Jun 2005 15:48:58 GMT
On 6/24/05, Clute, Andrew <Andrew.Clute@osn.state.oh.us> wrote:
> We are starting to find the all-or-nothing philosophy of the timeout
> setting for the Default Cache to be limiting. It is becoming obvious to
> us that we really have 3 levels that make sense: ShortLived (current
> setting), LongLived (orders of magnitude longer than current) and
> Permanent.
> We have implemented an extended Cache that handles these cases, but I am
> realizing that this could be beneficial in the main code base for OJB.
> Handling the three levels is pretty trivial, however the configuration
> of it is rife with questions.  The way we handled it was to create
> marker interfaces that our persistent objects extended to signify that
> they were either LongLived or Permanent. This caused the least amount of
> changes to OJB, but probably is not the cleanest (ties objects to OJB,
> etc).
> The other option, and probably the better one, is add a property at the
> ClassDescriptor level to signify the Cache timeout level. This has the
> downside of requiring more changes (config code and XDoclet code).
> So, that leads me to my questions:
> 1) Anyone have any issues or concerns with such a feature being added? (
> I am going to start with 1.0 branch first)

+1 for adding to 1.1,
-1 for adding it to 1.0 (if it is not configurable with the existing

> 2) Thoughts on the best way to handle the configuration of this? I do
> know that I do not want to make it attributes to the cache itself that
> marks which classes are which, this could become cumbersome as that part
> of the configuration is not auto-gened by anything.

I'd rather avoid putting cache-info into the class descriptors, mostly
because this is usage (dynamic) rather than structure (static) info.
So IMO this belongs more into the jcd-part. Also, you might want to
configure the cache differently depending on the jcd, which wouldn't
be possible when attaching this info to the class descriptor.
One solution would be to have the cache configuration recognize
patterns (regex ?!) rather than direct type names.


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

View raw message