Re: EditingContext Newbiee Question
Re: EditingContext Newbiee Question
- Subject: Re: EditingContext Newbiee Question
- From: Lachlan Deck <email@hidden>
- Date: Sun, 3 Aug 2008 08:29:27 +1000
On 02/08/2008, at 11:46 PM, Jeff Schmitz wrote:
Hi Dave,
Regarding your comments on ERXEC (which I am using in all my EO's,
or at least all my EO's extend ERXGenericRecord):
I always create new ECs for any task that is going to require
editing.
Using Project Wonder's ERXEC makes this particularly painless as it
handles the necessary EC locking automagically.
I have a long running background task. If I do as suggested here:
In the task method itself:
- Create a new ObjectStoreCoordinator (use Wonder OSC
synchronization if you want changes to propogate)
- Create any editing contexts using that single task OSC as a parent
- lock and unlock your ec's manually when working with them
Since I'm using ERXEC, should I be able to get away with NOT locking
and unlocking my ec's manually?
You need to handle locking for background threads seeing as they're
not related to a request/response loop - but a background thread.
What if I don't create a new ObjectStoreCoordinator for the
background task?
Doesn't matter. That's a separate question.
with regards,
--
Lachlan Deck
_______________________________________________
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