In my EJB bean, I am executing a sequence of sql statements in block. ie in same transaction. If any of the SQL gets failed, the exception will occur.
1. How can i rollback the transaction.
2. On rollback, If i want to perform some function, where will i be writing the logic for that.
e.g:- when exception occurs, control goes to catch bloc. should i write rollback in catch block. If yes, should i also write the logic to perform something extra operation on rollback, also in catch block.