mercredi 27 avril 2016

Spring MVC global blocking queue

I have a web application and I encountered a problem while developing it. I am new to Spring MVC, this is my first application.

In my app, there is a problem regarding more users who are trying to modify the same database table row in the same time. I don't want to use Hibernate (pessimistic approach) to lock the table row.

I want to make a blocking queue on the web Server.The blocking queue should be shared between multiple user's connection. For example, in the @RequestMapping scope for a specific url request i want to have this queue.

Another problem would be the fact that there are multiple table rows and there should be multiple blocking queues (one for each shared data). I am wrong with something, and i am not able to find a proper method to control the users' access. I want the users who made the request (for the same data) to be put in a blocking queue in order. The queue should execute in order their updates on the data so that there won't be any consistency problems with the database.

Thank you!




Aucun commentaire:

Enregistrer un commentaire