Envers should do nothing when JTA transaction is already marked as rollback-only

Description

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.

Environment

Hibernate 4.3.5, Spring 4.0.6, MS SQL 2012

Activity

Show:
Vladimir Velikiy
August 13, 2015, 10:32 AM

Simple patch for issue attached.

Steve Ebersole
September 16, 2015, 1:08 AM

, - 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?

AdamA
September 16, 2015, 8:06 AM

Makes sense, no need to do auditing if the transaction is rolled back

Assignee

Steve Ebersole

Reporter

Krzysztof Dębski

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Major
Configure