Can you please help me in this? Time is runing out for us. This is the only thing that is holding us from going to production. If I dont find a solution, I have to audit everything manually.
How can I know if all the updates are being collected or not? How can I check it?
I have downloaded all the Hibernate+Envers code and added it to my project to see whats happening.
When the beforeCommitTransaction method is called on AuditListener, I can see only one work unit to be audited. It is not accumulating all the work units through out the transaction. I have checked that the session used to do the insert/updates is the same one for all the operations. So audit process manager should return the same audit process. But in the end when I try to print the work units, there is only one work unit i.e., the last insert/update. All the updates occur inside a application server controlled transaction that spans the whole application(BPEL) and commits at the end of the BPEL. The session flush mode is AUTO.
Why are all others not accumulated in the work units list?
Hmm that's really strange. I don't have any ideas unfortunately.
Which Application Server are you using?
Can you take a look at AuditProcessManager and debug if the AuditProcess is properly found? It should be the same one for the whole transaction.