jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Short <...@benshort.co.uk>
Subject Concurrent Updates
Date Wed, 13 Jul 2011 14:55:50 GMT
Hi,

How would the following scenario be best handled with JackRabbit?

I have a product node that has a stock level property. As part of a checkout
process I want to decrement the stock level property based on the number of
products the user has in their basket.

If I where using JDBC I would create a transaction, create the order, update
the stock levels then commit the transaction. If 2 transactions had updated
the stock level at the same time, the last transaction to commit would throw
an exception saying that the underlying data had changed. I could then retry
the failed transaction until it completed or there was not enough stock to
complete the other.

What will JackRabbit do if I try to modify the same node/property from
different session?

Thanks

Ben

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message