title: Spring Transactions - how to split my method
body: <p>I have the following method that is called by controller:</p>
  <pre><code>@Transactional
  public Note getById(Long noteId, Collection&lt;Authority&gt; authorities) {
          permissionService.actionAllowed(authorities, Permission.NOTE);
          return getNote(noteId);
      }
  
   private Note getNote(Long noteId) {
          return repository.findById(noteId)
                  .orElseThrow(() -&gt; new MyException(&quot;Note does not exist&quot;));
  }
  </code></pre>
  <p>The problem is that we should keep transactions as short as possible so I have to call my validation method <code>permissionService.actionAllowed</code> outside of the trasaction scope. How to do it in the best way?
  I don't want to create additional public method with <code>@Transactional</code>... I don't have any idea</p>