Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is ths Transaction Handling Write or Wrong ?  RSS feed

 
dinesh thalis
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I little bit hesitate about Transaction handling in my application. I want to add data to database, before do this following steps should happen

  • add data to account table
  • update account serial which locate another table
  • add data to monthtrm table
  • update monthtrm serial which locate another table


  • In order to success this step I used container manager transaction below show that code




    Add data to account



    Add data to monthtrn




    Update Account serial




    Update Trnserial



    Exception Class



    Is this way correctly to handle Transaction? If I wrong please give me you're precious advice to improve my program efficiency, please give some comments

     
    Consider Paul's rocket mass heater.
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!