Re: Can't modify EO objects! ARGH! =(
Re: Can't modify EO objects! ARGH! =(
- Subject: Re: Can't modify EO objects! ARGH! =(
- From: Giorgio Valoti <email@hidden>
- Date: Tue, 22 Jul 2003 08:57:25 +0200
On Martedl, lug 22, 2003, at 02:55 Europe/Rome, Art Isbell wrote:
On Monday, July 21, 2003, at 02:17 PM, Jonathan Rochkind wrote:
I think using PEER ECs instead of nested ECs is strongly to be
encouraged, unless you have a specific reason otherwise.
Why not carry this to its logical conclusion and use an editing
context for each page as Cocoa does (did?) for each nib? There's
nothing special about the session's default editing context except
that WOSession manages its locks when concurrent request handling is
enabled. But as you've pointed out, who wants to be creating local
instances of all the objects you need in each editing context? It's
nice to use a single editing context when possible.
Using nested ECs, you end up doing something to your single session
default EC, and if you do something that somehow puts the EC in a
corrupt state, that corrupt state is left there for all subsequent
uses, and will keep throwing exceptions. I'm currently dealing with
this.
In that case, maybe you could just replace WOSession's default
editing context (setDefaultEditingContext()).
Also, unfortunately, once you start using multiple ECs, you need to
take care of LOCKING them all.
Only if one uses concurrent request handling, right?
I think that you should take care to lock anyway. Concurrent request
handling is a WOF feature.
--
Giorgio Valoti
-------------
_______________________________________________
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.