• 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: SharedEditingContext Write Locks?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SharedEditingContext Write Locks?


  • Subject: Re: SharedEditingContext Write Locks?
  • From: Ben Trumbull <email@hidden>
  • Date: Thu, 17 Nov 2005 11:46:52 -0800

At 10:36 PM -0500 11/16/05, Dov Rosenberg wrote:
If I want to use shared objects from a non shared editing context I need to
set the shared ec

SharedEc = EOSharedEditingContext.defaultSharedEditingContext();

EOEditingContext ec = new EOEditingContext ();
ec.setSharedEditingContext(SharedEc);

By setting the Shared EditingContext into my regular one, do I now get
automatic access to the shared objects stored within?

Yes. This is the primary working pattern for shared objects.

So if I do something like

    ec.objectsWithFetchSpecification(....)

And the objects had been previously retrieved by the SharedEC - would ec be
able to use them?

Yes. This is the pattern I recommend.

The shared objects will be pointer equal, no matter how many regular ECs are using them. Setting the regular EC's shared context to null allows you to fetch and change different working copies of the EOs, just as EOF works with regular ECs.

If you encounter problems using shared ECs, especially deadlocks and such, please file bugs with bugreport.apple.com. As I mentioned, to the best of my knowledge, all known deadlocking bugs in EOF have been addressed.
--


-Ben
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: SharedEditingContext Write Locks?
      • From: David Teran <email@hidden>
References: 
 >Re: SharedEditingContext Write Locks? (From: Dov Rosenberg <email@hidden>)

  • Prev by Date: iTMS WebObjects Engineering Positions Available
  • Next by Date: Re: WebObjects Bugs
  • Previous by thread: Re: SharedEditingContext Write Locks?
  • Next by thread: Re: SharedEditingContext Write Locks?
  • Index(es):
    • Date
    • Thread