title: One or multiple transactions in a single servlet request
body: <p>What is the best practice when I have to read data from the database, make operations that can take a second or two (like calling external API) and then updating the database?</p>
  
  <ol>
  <li><p>Should I make everything in one transaction that takes a couple of seconds?</p></li>
  <li><p>Should I make one transaction for reading the data, make all the processing, and then open a new transaction for writing the data?</p></li>
  </ol>