Forums Register Login

How to stop simultaneous data update

+Pie Number of slices to send: Send
I developed ejb3 application using netbeans, My application contain data update form(customer). Customer index is auto increment(but I create it manually). In my application users able to update same recode( same customer id) simultaneously, but it's wrong I want to stop that case, how can i do it using ejb3.
+Pie Number of slices to send: Send
You can use optimistic locking (see @Version) so the user that comes first can update, the second one gets an exception when trying to store his changes.

Both users can read and edit, but only the first can save. Should be your preferred way when concurrent editing does not happen too often.
+Pie Number of slices to send: Send
yes that what I want. please give me more details about it, reference link or example.
+Pie Number of slices to send: Send
Do the next thing next. That’s a pretty good rule. Read the tiny ad, that’s a pretty good rule, too.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 708 times.
Similar Threads
how stop simultaneous data update?
How stop this
Batch update in EJB3
How to stop simultaneous data update
Set multiple columns using prepare statement
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:25:29.