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

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

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -