title: Implementing Optimistic locking in Hibernate using @Version or LockMode.OPTIMISTIC or both
body: <p>I read that we can implement optimistic locking in hibernate using version field using <code>@Version</code>. Then on reading about pessimistic locking, I came to know that <code>org.hibernate.LockMode</code> class which has some options like <code>LockMode.OPTIMISTIC</code> etc which we can specify in <code>session.load()</code>.  </p>
  
  <p>So my question is do I need to use <code>LockMode.OPTIMISTIC</code> also along with <code>@Version</code>?</p>