Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is ths Transaction Handling Write or Wrong ?

 
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

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic