-
1. Re: Locking/Transaction handling for servlets
juhalindfors Jun 17, 2003 9:34 AM (in response to sgodden)you'd most likely want to use optimistic locking in this case
-
2. Re: Locking/Transaction handling for servlets
sgodden Jun 17, 2003 11:21 AM (in response to sgodden)OK, but a user could get fairly hacked off if we let him into an order with loads of complex stuff on the screen, he then takes 5 minutes to enter stuff, and then we find that conflicting updates have occurred.
I really need pessimistic locking (which I know introduces other issues), but that depends on a transaction(?). If I need to do my own thing, fair enough, but if there's a way of achieving it within the spec, I'd obviously prefer to do that. -
3. Re: Locking/Transaction handling for servlets
sgodden Jun 29, 2003 8:05 AM (in response to sgodden)Actually, when you think it through, pessimistic locking isn't the answer.
If someone just wanders off half-way through the transaction (for lunch or whatever), or their plug gets pulled from the wall, then pessimistic locking is going to cause all sorts of problems.
It's more a question of designing the application so that two users will not naturally be updating the same entity at the same time, and then using optimistic locking. -
4. Re: Locking/Transaction handling for servlets
juhalindfors Jun 29, 2003 4:27 PM (in response to sgodden)I agree ;-)