I am trying to persist the entity with constraint validation, when invoke persist - there is constraint that thrown and the caller get EjbTransactionRolledbackException
EjbTransactionRolledbackException
Just to integrate @Pascal's answer, it is also possible to mark Exception (if it's on your own) with
@javax.ejb.ApplicationException(rollback = true) public class UncheckedException extends RuntimeException {...}