Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exceptions on commit

 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the commit throws an exception do you need to do a manual rollback to close the transaction



or will the rollback the commit does internally do that for me?
 
James Sutherland
Ranch Hand
Posts: 553
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Commit will automatically rollback the database transaction if the commit fails.

You could is not quite right though, you should have a return or something after the rollback, otherwise you are trying to commit the transaction that was rolledback.
Normally the try/catch the commit is inside the try,

i.e.
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, i will update everything (not very big yet)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic