Re: Locking non default editing contexts in a multithreaded application?
Re: Locking non default editing contexts in a multithreaded application?
- Subject: Re: Locking non default editing contexts in a multithreaded application?
- From: Travis Britt <email@hidden>
- Date: Thu, 8 Apr 2004 08:31:55 -0400
On Apr 8, 2004, at 4:12 AM, Nicolas Cassoni wrote:
It is as if we had a shared EOEditingContext but with the possibility
to write.
[...]
not all of the time is spent modifying the editing context.
You may have good reasons for not using it, but this sounds like a job
for an EOSharedEditingContext. When you do need to change an EO create
a new EditingContext, remove it from the shared context, and then
relocate your EO into the new (non-shared) context:
EOEditingContext ec = new EOEditingContext();
ec.setSharedEditingContext(null);
EOGenericRecord editableEO =
(EOGenericRecord)EOUtilities.localInstanceOfObject(ec, sharedEO);
We're using this in an app that does a lot of concurrent ops and
getting great performance. Using 5.2.3.
tb
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.