Search code examples
javaeclipselinkaudit

Hibernate Envers for EclipseLink (Entity Auditing)


I have been looking at Hibernate Envers for entity auditing. I'm using EclipseLink but I'd like something similar.

I've seen some implementations that involve creating a SessionCustomizer to handle some of the persistence of auditing data. I'd really like something like Hibernate where I can simply annotate the entity and have the same effect.


Solution

  • Unfortunately, EclipseLink doesn't have a feature which covers auditing out-of-the-box.

    We use a SessionEventListener to intercept a flush or commit and use the calculated changeset for inserting the auditing data into audit tables.