Somehow I expected that answer.
I'm very busy at the moment, but I will try to find some time to reproduce the error in a test case for the 3.6.5-version. This test case can than be used for the latest version.
To me it seems the AuditProcess is still 'subscribed' to a 'doBeforeTransactionCompletion'-event. The removal from auditprocesses in AuditProcessManager doesn't seem to be enough to unsubscribe. An easy patch would be to set some 'removed'-attribute in the AuditProcess and check this attribute in doBeforeTransactionCompletion, but it seems a bit like a hack to me.
I hope, I get some time for this soon...
We have encountered similar issue in our project and with help of Adam we were table to fix it. I've created bug in Hibernate JIRA: https://hibernate.onjira.com/browse/HHH-7682 and pull request with failing test anf fix https://github.com/hibernate/hibernate-orm/pull/393 .
What is strange that this issue is present in Envers 3.6.6 but not in 4.1 version or at least my failing test is passing on 4.1.
This is great news!!! I didn't get any time to create a test as I hoped for in my last post here, so thanks a lot.
I'll check the fix as soon as possible (probably somewhere next week...) and leave a note here about my experience with it.
And some day we probably will migrate to 4.1...