title: How are the Spring @Transactional and the Hibernate @LockMode annotations related
body: <p>I wish to know the relation between transactions and locks.</p>
  
  <p>To be more specific, how is Spring's <code>@Transactional</code> related to Hibernate's LockMode. <a href="https://docs.jboss.org/hibernate/orm/4.0/devguide/en-US/html/ch05.html" rel="noreferrer">https://docs.jboss.org/hibernate/orm/4.0/devguide/en-US/html/ch05.html</a>.
  <a href="http://docs.spring.io/autorepo/docs/spring/4.2.x/spring-framework-reference/html/transaction.html" rel="noreferrer">http://docs.spring.io/autorepo/docs/spring/4.2.x/spring-framework-reference/html/transaction.html</a></p>
  
  <p>If I dont specify any lock while creating Session Object, and use <code>@Transactional</code> with <code>readOnly</code> as <code>false</code>, am I using Pessimistic Concurrenct Control.</p>
  
  <p>It would be a great help, if anyone can tell me the relation between (Optimistic/Pessimistic) Concurrency Control and Transactions.</p>
  
  <p>Thank you,
  Vivek</p>