how to handle form editing in a Multi-user environment?

无人久伴 提交于 2019-12-11 00:11:45

问题


My application is Multi-user application with server and client. In this one form is access by multiple user at the same time and they can perform save as draft or submit action.

The issue is that I want to control simultaneous editing of form by multi user.

For Example: User X is editing a value of textfield, checkbox and perform save as draft. And at the same time User Y edit the same value and submit form. Is there any way to control simultaneous form editing. any pointer?

I am using java , spring 3 , hibernate JPA in application.


回答1:


You're looking for optimistic concurrency control. With JPA/Hibernate, it can be as simple as adding an @Version annotated field in your entity.



来源:https://stackoverflow.com/questions/11557537/how-to-handle-form-editing-in-a-multi-user-environment

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!