• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Can't modify EO objects! ARGH! =(
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't modify EO objects! ARGH! =(


  • Subject: Re: Can't modify EO objects! ARGH! =(
  • From: Art Isbell <email@hidden>
  • Date: Mon, 21 Jul 2003 14:55:38 -1000

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? And that should be discouraged unless there is absolutely no other alternative. Few programmers can write bug-free multithreaded code. Debugging tools are not particularly effective with multithreaded code. So a huge effort can be required to write and debug multithreaded code.


Aloha,
Art
_______________________________________________
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.

  • Follow-Ups:
    • Re: Can't modify EO objects! ARGH! =(
      • From: Chuck Hill <email@hidden>
    • Local ECs (was Re: Can't modify EO objects! ARGH! =()
      • From: Jonathan Rochkind <email@hidden>
    • Re: Can't modify EO objects! ARGH! =(
      • From: Giorgio Valoti <email@hidden>
    • Re: Can't modify EO objects! ARGH! =(
      • From: Marek Wawrzyczny <email@hidden>
  • Prev by Date: Re: Nested Editing Contexts
  • Next by Date: Deploying on UNIX (RedHat)
  • Previous by thread: Re: Can't modify EO objects! ARGH! =(
  • Next by thread: Re: Can't modify EO objects! ARGH! =(
  • Index(es):
    • Date
    • Thread