Re: Cayenne, Tapestry and DataContext

From: Bryan Lewis (brya..aine.rr.com)
Date: Sat Nov 05 2005 - 17:28:35 EST

  • Next message: Oscar Picasso: "Re: Cayenne, Tapestry and DataContext"

    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



    This archive was generated by hypermail 2.0.0 : Sat Nov 05 2005 - 17:28:41 EST