How to override session.save in Hibernate Envers audit log


#1

Hi,
If I plan to asynchronously post audit information via JMS as per Adam in thread(https://developer.jboss.org/thread/1863) & do the save part delayed,

  1. do I need to recompile envers source?
  2. Is there a possibility by extending/overriding DefaultRevisionInfoGenerator or AuditProcess or any other classes?
    Suggestion of steps welcome

#2

Why no use Debezium instead?

If you need asynchronous audit logging, then maybe it’s easier to use Debezium to parse the transaction log instead of modifying Envers.


#3

Hi,

  1. Debezium we doubt a learning curve which might be beyond our timeline
  2. We doubt Debezium’s support to use Oracle 12c
  3. Debezium is not an established one right now(It may be stable). Continued support in future should not be a question.
    Thanks

#4
  1. It took me less than a day to learn it and write an article about it.
  2. Debezium has an Oracle adapter.
  3. The project is developed by Red Hat, and, not only that it’s stable, but it used in production by many systems.

Anyway, if you think its easier to change a framework in a way it was not designed to work instead of using a different technology which was aimed for that particular goal, then you should try and see how that will work out for you in the end.

Also, notice that JBoss forum thread is almost 10 years old and there is no solution provided. Envers is meant to work synchronously by design.

Now, related to changing the source code, you need to be aware that the project uses the LGPL license, so your custom Envers will also have to use the LGPL license.


#5

Thank you Vlad for your time. We will rethink on this.


#6

Great idea for learn something new