Optimistic locking
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Optimistic locking




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Optimistic locking  
Obiwan Jacobi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-05-05 10:51 PM

Hi,

As far as I can tell, there is no (optimistic) locking in CS2002SP3. We have
an e-commerce website and several order processing processes that all work
with (potentially) the same (order) data. Has anyone tried to implement
optimistic locking in CS? Or does anybody have any pointers (and why is this
not standard in CS2002!!)
--
Grtx
Marc Jacobi





[ Post a follow-up to this message ]



    Re: Optimistic locking  
Robert Bogue [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-06-05 12:52 PM

We single thread (or use a dispatcher model for) some operations to prevent
issues.  You'll see similar problems if you try to do product catalog
updates.

--
MS MVP Commerce Server, MCSE, MCSA:Security, etc.
I'm speaking at SharePoint Advisor Live! June 12-16th. Goto
http://advisorevents.com/cmt0506p.nsf/w/main-cms for more details
"Obiwan Jacobi" <ObiwanJacobi@discussions.microsoft.com> wrote in message
news:FC46CABF-62AE-489C-AA01-1483EAF24F92@microsoft.com...
> Hi,
>
> As far as I can tell, there is no (optimistic) locking in CS2002SP3. We
> have
> an e-commerce website and several order processing processes that all work
> with (potentially) the same (order) data. Has anyone tried to implement
> optimistic locking in CS? Or does anybody have any pointers (and why is
> this
> not standard in CS2002!!)
> --
> Grtx
> Marc Jacobi







[ Post a follow-up to this message ]



    Re: Optimistic locking  
Obiwan Jacobi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-06-05 10:54 PM

But thats so stupid! Every website has this issue (people pressing F5 and
issuing a second request for the same job)! -Oh sorry. No, you're workaround
is not stupid ;-)

The solution I'm currently working on involves a trigger on the OrderGroup
table that increments an version_seqnr (bigint) for the order being updated
after checking that the version_seqnr thats in the database is the same as
the version_seqnr being passed in the update. It will Raise an error and
rollback the transaction if these are not the same. Also after each save on
our Order we bump the version_seqnr in memory too (saves a trip to the
database). If the trigger raised an error this code will not be called.

Any thoughts on this solution, Robert? I'm not a big fan of triggers but in
this case it keeps the solution nicely transparent (except for that one code
change in our Save method)...

Thanx,
Marc Jacobi
Macaw Netherlands

"Robert Bogue [MVP]" wrote:

> We single thread (or use a dispatcher model for) some operations to preven
t
> issues.  You'll see similar problems if you try to do product catalog
> updates.
>
> --
> MS MVP Commerce Server, MCSE, MCSA:Security, etc.
> I'm speaking at SharePoint Advisor Live! June 12-16th. Goto
> http://advisorevents.com/cmt0506p.nsf/w/main-cms for more details
> "Obiwan Jacobi" <ObiwanJacobi@discussions.microsoft.com> wrote in message
> news:FC46CABF-62AE-489C-AA01-1483EAF24F92@microsoft.com... 
>
>
>





[ Post a follow-up to this message ]



    Re: Optimistic locking  
Robert Bogue [MVP]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-13-05 12:58 PM

That's what the timestamp field is designed to do ... check for differences
in versions.  But other than that, it is a solution.  If it works for you it
seems reasonable.

Rob

--
MS MVP Commerce Server, MCSE, MCSA:Security, etc.
I'm speaking at SharePoint Advisor Live! June 12-16th. Goto
http://advisorevents.com/cmt0506p.nsf/w/main-cms for more details
"Obiwan Jacobi" <ObiwanJacobi@discussions.microsoft.com> wrote in message
news:32EDA0DA-2B83-4D75-A3FD-C8A09334FADB@microsoft.com...[vbcol=seagreen]
> But thats so stupid! Every website has this issue (people pressing F5 and
> issuing a second request for the same job)! -Oh sorry. No, you're
> workaround
> is not stupid ;-)
>
> The solution I'm currently working on involves a trigger on the OrderGroup
> table that increments an version_seqnr (bigint) for the order being
> updated
> after checking that the version_seqnr thats in the database is the same as
> the version_seqnr being passed in the update. It will Raise an error and
> rollback the transaction if these are not the same. Also after each save
> on
> our Order we bump the version_seqnr in memory too (saves a trip to the
> database). If the trigger raised an error this code will not be called.
>
> Any thoughts on this solution, Robert? I'm not a big fan of triggers but
> in
> this case it keeps the solution nicely transparent (except for that one
> code
> change in our Save method)...
>
> Thanx,
> Marc Jacobi
> Macaw Netherlands
>
> "Robert Bogue [MVP]" wrote:
> 







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 09:33 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register