Re: Cayenne, Tapestry and DataContext

From: Oscar Picasso (oscgoogl..ahoo.com)
Date: Sat Nov 05 2005 - 17:55:07 EST

  • Next message: Bryan Lewis: "Re: Cayenne, Tapestry and DataContext"

    So I guess the remark in this post
    http://objectstyle.org/cayenne/lists/cayenne-user/2005/10/0120.html is not
    correct and I can reuse the same DataContext?

    Oscar

    PS: Korbinian, did you try to set the Max number of Objects in the "Cache
    Configuration" instead of creating a new context?

    --- Bryan Lewis <brya..aine.rr.com> wrote:

    > Of course Cayenne doesn't keep using memory without limit. If you look in
    > the project properties in the modeler, you'll see a section "Cache
    > Configuration" where you can specify the Max. Number of Objects.
    >
    >
    > ----- Original Message -----
    > From: "Oscar Picasso" <oscgoogl..ahoo.com>
    > To: <cayenne-use..bjectstyle.org>
    > Sent: Saturday, November 05, 2005 3:32 PM
    > Subject: Re: Cayenne, Tapestry and DataContext
    >
    >
    > > > I am also learning Cayenne and Tapestry 4 at the moment. The application
    > > > I am currently on has one DataContext in my ASO application scope class.
    > >
    > > What is an ASO application?
    > >
    > > > I am not sure what you mean by DataContext growth by retrieving from it.
    > > > I guess growth can be controlled.
    > >
    > > Lets's say I have
    > > Person
    > > {
    > > Person mam;
    > > Person dad;
    > > List<Person> children;
    > > }
    > >
    > > // Actually execute some query with the data context.
    > > Person albert = dao.findByName("Albert")
    > >
    > > At this point, my understanding is that albert.children are not in memory.
    > > Then if i do something like:
    > >
    > > for(Person child: children)
    > > {
    > > do somthing with child;
    > > }
    > >
    > > The children are loaded in memory, if I keep looking for the children of
    > the
    > > children and so on, each time more persons are loaded in memory.
    > >
    > > Am I right?
    > >
    > > If that the case, for some big potential graphs, at some point you end up
    > with
    > > thousands or millions of Objects/Persons in memory if you use the same
    > > DataContext.
    > >
    > > I don't know how Cayenne deals with this situation. Does it discard the
    > least
    > > recently used Objects, does it perform some kind of caching, or do we need
    > to
    > > keep track of the Object creation to avoid a potential
    > OutOfMemoryException.
    > >
    > > Oscar
    > >
    > >
    > >
    > >
    > > __________________________________
    > > Yahoo! FareChase: Search multiple travel sites in one click.
    > > http://farechase.yahoo.com
    >
    >

                    
    __________________________________
    Yahoo! FareChase: Search multiple travel sites in one click.
    http://farechase.yahoo.com



    This archive was generated by hypermail 2.0.0 : Sat Nov 05 2005 - 17:55:08 EST