I\'ve a service method called add()
which is annotated with @Transactional
.
I call it but when a ConstraintViolationException occurs inside
Ah, I see what happens. The ConstraintViolationException happens at commit time, after the method has been executed, when the transaction interceptor around your add()
method tries to commit the transaction. Since it can't commit, obviously, the transaction is rollbacked. It can't to anything else.