• 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: Object Store Coordinator and User Info – Is this Dangerous?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Object Store Coordinator and User Info – Is this Dangerous?


  • Subject: Re: Object Store Coordinator and User Info – Is this Dangerous?
  • From: Chuck Hill <email@hidden>
  • Date: Tue, 28 Oct 2008 17:52:28 -0700


On Oct 28, 2008, at 5:43 PM, Andrew Lindesay wrote:

Hello Peter;

You expect that you mean to lock the OSC? I thought that the OSC gets locked when you lock the EC?

No, of course not. An ec (the defaultEditingContext) gets locked each time the session is awoken. If this locked the OSC, concurrent dispatch would not be possible. The OSC only get locked while fetching or saving.


Chuck


Im not sure if it is safe or not, but i would lock/unlock around the call to the setUserInfoForKey() method.

Regards

Peter

On 29/10/2008, at 11:36 AM, Andrew Lindesay wrote:

Hello;

I want to put some data into the user info of an object store co- ordinator and then pull it out again in notifications.

	ec.lock();

	try
	{
		ec.rootObjectStore().setUserInfoForKey(xyz,"foobar");

		try
		{
			// do some editing context foo here!
		}
		finally { ec.rootObjectStore().setUserInfoForKey(null,"foobar");
	}
	finally { ec.unlock(); }

That should be safe should it not or am I playing with fire?

cheers.

___ Andrew Lindesay www.lindesay.co.nz

_______________________________________________
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


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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: Object Store Coordinator and User Info – Is this Dangerous?
      • From: Andrew Lindesay <email@hidden>
References: 
 >Object Store Coordinator and User Info – Is this Dangerous? (From: Andrew Lindesay <email@hidden>)
 >Re: Object Store Coordinator and User Info – Is this Dangerous? (From: Peter Vandoros <email@hidden>)
 >Re: Object Store Coordinator and User Info – Is this Dangerous? (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Re: Object Store Coordinator and User Info – Is this Dangerous?
  • Next by Date: Re: wosid != session().sessionID()
  • Previous by thread: Re: Object Store Coordinator and User Info – Is this Dangerous?
  • Next by thread: Re: Object Store Coordinator and User Info – Is this Dangerous?
  • Index(es):
    • Date
    • Thread