Re: Cayenne, Tapestry and DataContext

From: Borut Bolčin (cayenn..mail.si)
Date: Sat Nov 05 2005 - 16:10:51 EST

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

    Oscar Picasso wrote:

    >>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?
    >
    >
    Look here http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso

    >
    >
    >>I am not sure what you mean by DataContext growth by retrieving from it.
    >>I guess growth can be controlled.
    >>
    >>
    I am sure Andrus and others will help you on that. bob

    >
    >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 - 16:10:22 EST