title: Is usage @Transactional Annotation Necessary? Spring boot
body: <p>So I'm new in Spring and currently confused about @Transactional Annotation, I have read a lot of question and answer about this topic and it seems I still don't get it.</p>
  <p>And here is my question:</p>
  <ul>
  <li><p>Do you need @Transactional Annotation when performing insert update delete? when I was trying to prove that, I can still perform insert and update. Do you have any idea why that's happened?</p>
  </li>
  <li><p>Is there any performance benefit or issue if you use or not using @Transactional Annotation? Like connection management.</p>
  </li>
  <li><p>What will happen if I don't use @Transactional Annotation in my program?</p>
  </li>
  <li><p>In my experience using @Transactional, the update query will be flushed and committed after the method is finished, and I have some cases that I don't want that happen. For example:</p>
  </li>
  </ul>
  <pre><code>@Transactional
  private void doSomething() {
     TransactionEntity te = te.findById(&quot;&quot;);
     try {
        //fetch using feign and throw customTimCustomTimeoutException 
     } catch (CustomTimeoutException e) {
        te.workflowFailure(&quot;doSomething&quot;);
        repository.save(te);
     }
     //validation
     //business logic
     //save this save that
     //end of method and changes will be flushed and committed
  }
  </code></pre>
  <p>what if, at the end of the method the database goes offline, it will rollback right, you will lose all your progress right. Even tho maybe when in repository.save(te) in catch block statement the database was okay and you don't want to lose that progress. Is there any solution or idea about this?</p>
  <p>Thanks.</p>