Re: Thread Bound DataContexts - Bad Pattern?

From: Joshua Pyle (joshua.t.pyl..mail.com)
Date: Mon Dec 05 2005 - 20:30:24 EST

  • Next message: Malcolm Edgar: "Re: Thread Bound DataContexts - Bad Pattern?"

    Yes I use Transfer objects to store data from cayenne over the life of
    a session. I've found that never storing cayenne objects in the
    session scope cleans up my application and makes session failovers
    much cleaner.

    Joshua T. Pyle

    On 12/5/05, Tore Halset <halse..vv.ntnu.no> wrote:
    > On Dec 5, 2005, at 18:04, Joel Trunick wrote:
    >
    > > I've been putting static methods on my domain objects to perform
    > > things
    > > like queries (for that object), and even simple methods load an
    > > instance
    > > by ID (returning an instance of the proper type). I find this
    > > organization very straightforward to use from a client perspective.
    >
    > I am doing the same, but with DataContext bound to a tapestry Visit
    > object. Just include the context as a argument to the static methods.
    >
    > > 1) When do you ever need multiple datacontexts? (right now from web
    > > app)
    >
    > I use extra DataContext to generate some reports as it is very nice
    > to be able to throw away the DataContext afterwords to save memory.
    >
    > > 2) Is the thread bound context a limitation?
    >
    > I have not used thread bound context that much. You will have to be
    > sure that the contexts are the same as any data objects that live
    > longer than a single request/response. *Or* move objects between
    > contexts.
    >
    > Regards,
    > - Tore.
    >

    --
    Joshua T. Pyle
    Go has always existed.
    



    This archive was generated by hypermail 2.0.0 : Mon Dec 05 2005 - 20:30:26 EST