[jboss-user] [EJB 3.0] - difference between @Version and EntityManager.lock

adamzrk do-not-reply at jboss.com
Sat Jun 9 11:36:45 EDT 2007


Hi

 What is the difference between @Version and EntityManager.lock method?
When I use @version then If one client is updating entity the version attribute is being increased and if another client wants to update the same entity the OptimisticLockException is thrown - there is no wainting for the second client?
What is the situation with the lock method?

Regards
Adam

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052817#4052817

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052817



More information about the jboss-user mailing list