• 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
Re: sequential numbering across more instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sequential numbering across more instances


  • Subject: Re: sequential numbering across more instances
  • From: Guido Neitzer <email@hidden>
  • Date: Fri, 15 Aug 2008 12:57:08 -0600

On 15.08.2008, at 11:13, Chuck Hill wrote:

NOW, the hard part! For every save you are going to have to trap OptimisiticLocking exceptions and check if it failed on OrderNumer. If it did, you are going to need to call order.assignOrderNumber() again and repeat until the save succeeds. This will be problematic if you have multiple Orders being saved in one transaction.

Hmm, and there is one other rather serious problem: If another order saves first, it will update the snapshot for OrderNumber and you will not get the needed OptimisiticLocking exception. You would need to catch the Object Changed In Store notification and based on that updating OrderNumber, invalidate and re-assign the number you had previously generated.

It's probably easier to wrap the same idea inside some simple direct SQL statements.


cug

--
http://www.event-s.net

_______________________________________________
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


  • Follow-Ups:
    • Re: sequential numbering across more instances
      • From: Chuck Hill <email@hidden>
References: 
 >sequential numbering across more instances (From: Ondřej Čada <email@hidden>)
 >Re: sequential numbering across more instances (From: Florijan Stamenkovic <email@hidden>)
 >Re: sequential numbering across more instances (From: Ondřej Čada <email@hidden>)
 >Re: sequential numbering across more instances (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: WOBuilder substitute for Eclipse 3.3+ in Leopard
  • Next by Date: Re: sequential numbering across more instances
  • Previous by thread: Re: sequential numbering across more instances
  • Next by thread: Re: sequential numbering across more instances
  • Index(es):
    • Date
    • Thread