Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
- Subject: Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
- From: Chuck Hill <email@hidden>
- Date: Tue, 10 Jun 2003 16:46:14 -0700
- Organization: Global Village Consulting, Inc.
I've changed the subject as we are getting off the original topic.
Alan Ward wrote:
However, for optimistic locking failures, check constraint violations
(such as uniqueness tests), and such it is often better to allow the
user to attempt recovery than to discard their changes.
Or to prevent them from being able to experience such failures ;-)
This could be interesting. How can this be done in a multi-threaded
or multi-instance application? I think that the database is the only
place where unique constraints (e.g. a user ID) can be checked without
risking race conditions. Optimistic locking failures can be avoided
with pessimistic locking at the database - something to be avoided
IMHO. They can also be avoided by a "last write wins" strategy of
forcing the update or by not checking for failures at all. Neither of
those seem like a good, general purpose solution.
Cheers,
Chuck
--
Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net
Progress is the mother of all problems.
- G. K. Chesterton
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.