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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -