I have a spent the couple of days on studying the concepts you implemented in envers in order to see how can I use it for our business use case.
I see that it won't be possible to use envers in a typical business case when data is first to be approved prior to saving it to the production table.
(this is no critic to envers, being a technical audit logging component!).
My idea is to "tweak" the UPDATE event so, that it decides on the fly whether only the revision table should be updated and the update to the production table should no thappen. As weird as it sounds, I have such a use case.
In this case I would add some additional logic to your AuditListener which decides whether to update both tables (production + audit) or just the audit table.
Is such a scenario possible? Can I stop Hibernate from update in a listener if I want to?