Re: Object Store Coordinator and User Info – Is this Dangerous?
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:42:33 -0700
On Oct 28, 2008, at 5:36 PM, 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?
Define safe. ec.lock() does not lock the root object store, so other
ec's can also set / clear foobar while you are in this code.
Chuck
--
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