Re: sequential numbering across more instances
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