cayenne-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Gentry" <blackn...@gmail.com>
Subject Re: deadlock in CayenneContext.commitChanges
Date Fri, 09 Nov 2007 22:45:10 GMT
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 <ari@ish.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
>
>
>

Mime
View raw message