cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrus Adamchik (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAY-1586) New extension point: a strategy for retaining objects in the ObjectStore
Date Fri, 08 Jul 2011 07:23:16 GMT
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


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