Re: editing context locking
Re: editing context locking
- Subject: Re: editing context locking
- From: Jacky Gagnon <email@hidden>
- Date: Wed, 6 Apr 2005 15:32:09 -0400
Hi,
You must always lock if you don't use the session().
defaultEditingContext().
Its the best practice!
Jacky
On 05-04-06, at 14:45, Florijan Stamenkovic wrote:
Hi all...
I bet locking has never been discussed here before :)
I did check the list archives and online documentation and came up
with a lot of helpful advice. And found a way to properly handle my ec
when it comes to locking, as I see it. It is just that another
question came to mind:
When I am creating new objects within a completely new editing context
(nested into the default one) do I _need_ to lock??? I have a
component for creating and setting up a record. The component spans a
few RR cycles (it is divided into parts by conditionals). That
component creates both the editing context and the records, and only
after they are set up and validated saves them to the
defaultEditingContext()
So, as I see it there is no way for another part of the application
not know about the objects in this part (as they are new and not yet
in the database). So, is there a reason to lock, as no other thread
can touch them because they are not really there yet...? And if
somebody else wants to add some more records, a new editing context is
created.
Oh, and it is possible that this has also come up before, but i did
not see it.. Sorry if that it the case.
Florijan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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