I have Stateles bean with method:
... @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) public void addUser(User user) throws Exception { try { em.persist(user); } catch (Exception e) { throw e; } } ...
java.lang.RuntimeException: org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=lserver/662, BranchQual=, localId=662] status=STATUS_NO_TRANSACTION; - nested throwable: (org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update)
the tx actually rollback hence the exception