In my controller I would like to be able to return a message that indicates that an error produced a rollback.
For example:
I know I could detect the exception that triggers a rollback and set a return value that can be used to determine if there was a rollback. I would rather have Spring tell me.Code:someService.insertRowInDB ( someDomainObject ) ; // this method annotated with @Transactional if (thereWasARollback) { return rollback ; // view name } else { return success ; // view name }
Thanks,
bils


Reply With Quote