3 Replies Latest reply on Jun 10, 2007 9:36 AM by Andrew Rubinger

    difference between @Version and EntityManager.lock

    Adam Newbie

      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