0

How can i implement the below in Spring Boot.i need to calls 1st m1() and then m2()

m1 and m2 are 2 methods in 2 different classes which calls 2 different stored procedure .P_CODE is the ouput value retuned by m1 and m2 .

   begin
        m1()
        if p_code==0
        {
        m2()
        end transaction
        }
        else
        {
        end transaction
        begin
        m2()
        end transaction
        }

   
  1. When p_code retuned by m1 is 0 then m1 and m2 should belong to same transaction.
  2. When p_code retuned by m1 is not 0 then m1 and m2 should belong to different transaction.
Pale Dot
  • 17
  • 4

0 Answers0