title: How to Implement Transactions in a Non-Transactional Database
body: <p>How to Implement Transactions in a Non-Transactional Database. </p>
  
  <p>1) Please explain in How you can do this on java side.</p>
  
  <p>Note: I will share the efforts I put in finding the answer.</p>
  
  <p>Suppose you have two inserts and two updates in a single transaction. So you will have four threads executing each instruction, One thread will monitor them all. If there is any failure in one of the thread so the monitoring thread will cancel out everything.</p>