title: Handle Simultaneous database updates in Java +hibernate
body: <p>Hi i am working on a project and i have to handle a case when 2 users are on the same screen working on the same orders. If user 1 submits or updates an order first then i don't want user 2 to submit the same order, but instead give him a warning that these orders are already submitted and then refresh the page. Do you guys think if this is correct approach and also how do i go about implementing this in Java and hibernate.?</p>