Re: DataContext problem?

From: Arndt Brenschede (a..iamos.de)
Date: Fri Apr 18 2003 - 07:39:16 EDT

  • Next message: m..scensys.de: "Re: Re: DataContext problem?"

    Michael Schuldt wrote:
    > Hi,
    >
    > in my web-application I'm using a DataContext for each session. When I'm
    > creating new objects or updating existing ones and commting them to the
    > database everything's ok. I can see the changes or the new Objects by
    > reading them again through a query with the same DataContext.
    > But the problem is with other sessions. I can't read the changes or the new
    > objects commited fromout the other session from the database. There are only
    > the old ones. But when I'm creating a new session, I can see everything!
    >
    > Any suggestions? It's very urgent.

    Well, what you describe is what you should expect (?) ...

    Sounds like you are using the DataContext with
    session-lifetime, not request-lifetime, do you?

    So this DataContext works like a cache, and
    you don't get notified if an object changes in
    the Database.

    Could you describe your architecture some
    more? If this "session-lifetime-d" DataContext
    is by intention and you rely on this caching,
    then you might have a real problem.

    Otherwise, you could think of using
    short-lived (=request lifetime) DataContext's

    Regards,

    Arndt



    This archive was generated by hypermail 2.0.0 : Fri Apr 18 2003 - 07:29:57 EDT