How do I prevent exceptions from causing a transaction rollback under Grails?
问题 My Grails service is having an issue where a swallowed exception unrelated to a transaction is causing the transaction to rollback even when it is unrelated to the persistance of the domain object. In my service I have something along the lines of updateSomething(domainObj) { def oldFilename = domainObj.filename def newFilename = getNewFilename() domainObj.filename = newFilename domainObj.save(flush: true) try { cleanUpOldFile(oldFilename) } catch (cleanupException) { // oh well, log and