title: Spring @Transactional behaviour in case of multiple update queries
body: <p>I have a method that should perform multiple updates and want to be sure that if one update fails then no updates are commited to the database, the code looks like:</p>
  
  <pre><code>    private void updateStatuses(List&lt;Status&gt; statuses, String docId) {
          statuses.forEach(status-&gt; {
              Long nextVersionNumber = Long.parseLong(status.getRecordVersionNbr()) + 1;
              getJdbcTemplate().update(
                      UPDATE_FUNDS_TRANSFER_DOC_ID_SQL,
                      nextVersionNumber,
                      docId,
                      status.getStatusId());
          });
      }
  </code></pre>
  
  <p>I want to annotate this method with org.springframework.transaction.annotation. @Transactional, would this work for me? Should I specify some extra-parameters? </p>