Transaction flow for distributed transaction in Spring Batch

21 views Asked by At

I am relatively new to spring batch. I have a spring batch which fetch's an event from oracle DB and perform business validations and updates business tables for example - generates new entries in message log table with new message id and generates JMS message having the message id and stores the message in archive table before sending the message to JMS queue. All these steps are present in a java method which is called from processor in spring batch job. I need to understand the current Transaction management flow

  1. if this logic is part of a method called from processor in spring batch step, so my understanding is spring batch is creating 1 transaction for this step with propagation required.
  2. Does Spring batch uses application level transaction (as my batch jobs are part of spring application only) or it creates a new transaction for its step and item processor and item writer are part it.

Further I have been tasked to convert this global transaction into local transaction. For this what should be approach with minimum code changes. My team is thinking of implementing Transactional OutBox pattern

I am trying to debug the code however i am not able to. what will be the transaction class, i can put debugger on ?

0

There are 0 answers