When JTA transaction is already marked as rollback-only, then Envers should not try to do any auditing.
In current version, Envers fails when JTA transaction is already marked as rollback-only and it tries to do auditing. As a result, exception is being thrown which swallows the original exception (for example ConstraintViolationException). For more information, see HHH-8181.
Hibernate 4.3.5, Spring 4.0.6, MS SQL 2012
Simple patch for issue attached.
, - It seems reasonable to me to have envers short-circuit its work when the JTA transaction is marked for rollback only. What are y'alls thoughts?
Makes sense, no need to do auditing if the transaction is rolled back