title: SpringBoot & nested transaction isolation level override
body: <p>Spring boot, jdbc.</p>
  <p>I feel a bit slippery when it comes to nested transaction..</p>
  <p>Say there is MyService that uses MyRepository.</p>
  <pre><code>    @Named 
      @Transactional(isolation=Isolation.READ_COMMITTED) // READ_COMMITTED &lt; SERIALIZABLE
      class MyService {
        void do() {
          myRepository.add(entity);
           ...
        }
      }
      @Repository
      class MyRepository {
           @Transactional(propagation=Propagation.REQUIRED, isolation=Isolation.SERIALIZABLE)
           void add(entity) {...}
  
      }
  </code></pre>
  <p>Say, in this case i want to make sure that MyRepository takes care about the add() method, making sure it set a maximum level lock <code>Isolation.SERIALIZABLE</code> over the table it deals with.</p>
  <p>I do not want anyone to override it, since it would lead to concurrency issues.</p>
  <p>(same applies to propagation level)</p>
  <p>Question:</p>
  <p>In case of nested transaction, will transaction's of <code>myService.do()</code> override Isolation level of <code>myRepository.add</code> and maker it less strict ?</p>
  <p>What are the precautions when dealing with nested transactions?</p>