You should commit only at end of try block. As everyone knows, finally block will always be invoked regardless of exception throw or not. So obviuosly you need not commit after rollback during exception.
vidhya Narayanan wrote:I too have the same problem.I have a set of tables where i will perform n number of updates and deletes. If i use this rollback() , will i get the previous values that were present?
Yes. Rollback undoes all updates and deletes from when you started your transaction.