Re: DataContexts, sessions, and sharing data

From: Andriy Shapochka (ashapochk..otmail.com)
Date: Wed Feb 11 2004 - 16:55:11 EST

  • Next message: Jim Menard: "Re: DataContexts, sessions, and sharing data"

    ----- Original Message -----
    From: "Andrus Adamchik" <andru..bjectstyle.org>
    To: <cayenne-use..bjectstyle.org>
    Sent: Wednesday, February 11, 2004 11:26 PM
    Subject: Re: DataContexts, sessions, and sharing data

    > Jim,
    >
    >
    > On Feb 11, 2004, at 3:29 PM, Jim Menard wrote:
    > > I think I want all of my user's sessions to share the same data
    > > context. Here's why; please tell me if I'm wrong:
    >
    > No, you likely don't want to use the same DataContext for all sessions.
    > You may want other users to see recent *committed* changes, but not the
    > work in progress.
    >
    > ...
    > Andrus
    >

    Jim,

    I think you could achieve acceptable results even with Cayenne 1.0
    refreshing the data cached in users' data contexts from the database, say,
    every couple of minutes or so (depends on average amounts of data to
    invalidate). This will ensure the users see the reasonably fresh data and,
    at the same time, won't build up the high pressure on your JDBC connection
    and JVM. Sharing a context among sessions is quite dangerous.

    Andriy.



    This archive was generated by hypermail 2.0.0 : Wed Feb 11 2004 - 16:51:54 EST