title: Spring Transaction Isolation Level
body: <p>Most of us might be using Spring and Hibernate for data access.
  I am trying to understand few of the internals of Spring Transaction Manager.</p>
  
  <p>According to Spring API, it supports different Isolation Level - <a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/transaction/annotation/Isolation.html" rel="nofollow">doc</a>
  But I couldn't find clear cut information on which occasions these are really helpful to gain performance improvements.</p>
  
  <p>I am aware that <code>readOnly</code> parameter from <code>Spring Transaction</code> can help us to use different TxManagers to read-only data and can leverage good performance. But it <code>locks</code> the table to get the data to avoid dirty-reads/non-committed reads - <a href="http://www.byteslounge.com/tutorials/spring-transaction-isolation-tutorial" rel="nofollow">doc</a>. </p>
  
  <p>Assume, in few occasions, we might want to blindly insert the records into a table and retrieve the information without locking the table, a case where we never update the table data, we just insert and read [append-only]. Can we use better Isolation to gain any performance? </p>
  
  <ol>
  <li>As you see from one of the reference links, do we really require to implement/write our own CustomJPADiaelect? </li>
  <li>What's the better Isolation for my requirement? </li>
  </ol>