cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dzmitry Kazimirchyk (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (CAY-1586) New extension point: a strategy for retaining objects in the ObjectStore
Date Fri, 15 Jul 2011 09:55:59 GMT

     [ https://issues.apache.org/jira/browse/CAY-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Dzmitry Kazimirchyk closed CAY-1586.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M3
         Assignee: Dzmitry Kazimirchyk

Added injectable ObjectMapRetainStrategy which can be configured via RuntimeProperties to
use weak,soft or hard references to objects in the ObjectStore.
Now it can be defined through 'org.apache.cayenne.context_object_retain_strategy' property
with possible values: 'weak', 'soft', 'hard'. If it's not specified weak references are chosen
by default.

> New extension point: a strategy for retaining objects in the ObjectStore
> ------------------------------------------------------------------------
>
>                 Key: CAY-1586
>                 URL: https://issues.apache.org/jira/browse/CAY-1586
>             Project: Cayenne
>          Issue Type: Task
>          Components: Core Library
>    Affects Versions: 3.1M2
>            Reporter: Andrus Adamchik
>            Assignee: Dzmitry Kazimirchyk
>             Fix For: 3.1M3
>
>
> Currently ObjectStore.objectMap uses WEAK references to objects, often causing premature
garbage collection of cached objects and extra queries on relationship resolving, etc. In
many cases using SOFT (or HARD) retain strategy may be desirable. So I suggest to make it
a configurable via DI. 
> To achieve that we can create a pluggable strategy class that is used whenever DataContext/ObjectStore
are created. Should probably also deprecate the following ObjectStore constructors to reduce
confusion:
>  public ObjectStore() {
>         this(null);
> }
> public ObjectStore(DataRowStore dataRowCache) {
>      this(dataRowCache, null);
> }

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message