java - Does @Transactional annotation work if autocommit is true? -


would roll work if auto commit turned on? if not implications of turning auto commit off?

@transactional(rollbackfor = {managerexception.class}) public mymethod()....{     system.out.println(my_spring_stored_procedure.getdatasource()             .getconnection().getautocommit()) //true     ....     try {         result = this.my_spring_stored_procedure.execute(params);     }catch(dataaccessexception e){         throw new managerexception(e);     } } 

yes. if check code, find when spring uses kind of way transaction. if config auto commit true, change false , after transaction change true.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -