Re: deadlock in CayenneContext.commitChanges

From: Michael Gentry (blacknex..mail.com)
Date: Fri Nov 09 2007 - 17:45:10 EST

  • Next message: Andrus Adamchik: "Re: [VOTE] Re: 3.0 M2 Release Vote"

    I did the same in an application I wrote, although it read and wrote
    through the shared data context. I put my own synchronized methods
    around everything I did with it, though. It worked fine, but was more
    manual work. The benefit was less memory overall and, more
    importantly for this app, it sped things up for everyone as there was
    a shared database view and DB access was pretty expensive.

    On 11/9/07, Aristedes Maniatis <ar..sh.com.au> wrote:
    >
    > On 10/11/2007, at 2:14 AM, Michael Gentry wrote:
    >
    > > "DataContext is not thread-safe, as it is intended for access by a
    > > single user.
    >
    > Ah, yes. Thanks for unearthing that. I wonder though if it might be
    > safe for read only access. For quite some time now we've been using a
    > single 'shared' context for the read only parts of the application in
    > order to reduce memory use. We've never hit a problem, but maybe we've
    > just been lucky.
    >
    > Thanks
    > Ari
    >
    >
    >
    > -------------------------->
    > ish
    > http://www.ish.com.au
    > Level 1, 30 Wilson Street Newtown 2042 Australia
    > phone +61 2 9550 5001 fax +61 2 9550 4001
    > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Fri Nov 09 2007 - 17:45:46 EST