• 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
Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
      • From: Jonathan Rochkind <email@hidden>
References: 
 >Re: "Cannot obtain globalId for an object which..." (From: Alan Ward <email@hidden>)

  • Prev by Date: Re: "Cannot obtain globalId for an object which..."
  • Next by Date: Instance fails to start using Monitor
  • Previous by thread: Re: "Cannot obtain globalId for an object which..."
  • Next by thread: Re: Handling exceptions in saveChanges() (Was: "Cannot obtain globalId for an object which...")
  • Index(es):
    • Date
    • Thread