how to make autocommit false in stored procedure execute() method
In Spring framework we are using abstract class StoredProcedure to call stored procedures from Java by using execute(input Map) method.
but as per my requirement i need to call execute() method under loop and have to commit at the end of for loop .if any thing wrong in between the loop to call Storedproc we need to rollback executed transaction.
but each time calling the execute method it will commit automatically in the DB. Please provide solution for this...
Re: how to make autocommit false in stored procedure execute() method
Make sure the procedure itself doesn't commit. Make sure sure the connection's autocommit is turned off, make sure Spring doesn't commit anything until your loop is finished.