Re: Storing a copy of a DataObject in the session

From: Mike Kienenberger (mkienen..laska.net)
Date: Tue Mar 15 2005 - 15:54:45 EST

  • Next message: Mike Kienenberger: "Re: Storing a copy of a DataObject in the session"

    Fredrik Liden <flide..ranslate.com> wrote:
    > Are you actually storing live DataObjects in the session? and it's
    > keeping it's relationship with the Context?
    >
    > Do you have to make sure the status is not new or updated? So not to
    > accidentally commit something later on or having some ID generation
    > conflict? Or what if several people store the same object in their
    > sessions, hmm?

    I make it a point to never have objects in any state except COMMITTED or
    HOLLOW between page requests.
    In fact, I modified RequestProcessor to check for such a situation at the
    beginning of a request and email me an error if it were to ever occur.
    Each session has a unique DataContext, so the only danger is two requests
    being processed for the same session. I also added code to
    RequestProcessor to serialize processing of all requests to the same session
    to avoid this problem.



    This archive was generated by hypermail 2.0.0 : Tue Mar 15 2005 - 15:53:42 EST