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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -