title: Retry mechanism for optimistic locking (spring data + JPA)
body: <p>We decided on using optimistic locking in our web application in order to increase concurrency and without the using of pessimistic locking.</p>
  
  <p>We are now on a lookout for retry solutions.</p>
  
  <p>We would like to have as little impact as possible to our current code base.</p>
  
  <p>One of the solutions we saw on the web is using a retry interceptor with annotation to mark a method as retry able.</p>
  
  <p>Problem is we would like to annotate methods that are having the @Transactional annotation on them but the interceptor fails to retry them for some reason. (the interceptor retries non transactional methods perfectly.)</p>
  
  <p>So:</p>
  
  <p>1) Are there any alternatives for the retry that will have minimum impact on our code?</p>
  
  <p>2) Are there any documentations \ tutorials for that solution?</p>
  
  <p>3) Is it even possible to retry a @Transactional annotated method?</p>
  
  <p>Cheers!</p>