Transactions, Spring.
code snippet. We make some DB calls, then we call external API and then again we make DB calls and then we make an internal API Call. @Transactional public void completeOrder(OrderRequest request) { generateOrder(request); // DB call generateInvoice(request); // DB call paymentApi(request); //