title: javax.persistence.OptimisticLockException VS org.springframework.orm.ObjectOptimisticLockingFailureException
body: <p>I have this piece of code in a SpringBoot app. SpringBoot v1.5.14.RELEASE </p>
  
  <pre><code>    try {           
          bookAction result = bookActionRepository.save(bookAction);
      } catch (ObjectOptimisticLockingFailureException e) {
          LOG.error (e.getMessage());
      }
      return false;
  </code></pre>
  
  <p>But I have this exception in the application :</p>
  
  <pre><code>javax.persistence.OptimisticLockException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)
  </code></pre>
  
  <p>Which difference there are between <code>OptimisticLockException</code> and <code>ObjectOptimisticLockingFailureException</code> ? How do I know which exception will throw the application ?</p>