I have these databases
Where each database has the quantity of items that are available to be sold from shop1, shop2 and shop3. I want my data to be concurent. For example 2 users may want to buy the same item the same time and the manager want to change the quantity the same time. I want to ensure that the manager will change the quantity first and then one of the user will try to buy the item and them the other although they will try together. I want to be sure that the items that will be sold will be excactly as many as the manager wants.
I am using mysql and jsp to do this.
Where i can find informations about that or an example would be better
When the user decide reserve the item-> pay it and can do it for many items of the site