2 Replies Latest reply on Jan 31, 2013 3:55 PM by J McAuley

    Extend and register Envers listeners with Envers 4

    J McAuley Newbie

      I am currently working with Hibernate and Envers 3.6.  We integrated Envers into an existing system, and in order to programmatically populate existing data to the audit tables I "extended" and made some  tweaks to AuditEventListener.  (I say "extended" because that class wasn't really written for easy extension so it was more of a copy-paste job.)  This worked fine since I could register my version of AuditEventListener in our persistence.xml file.  However, we're now wanting to upgrade to Envers and Hibernate 4.0.  I'm noticing that the AuditEventListener was broken up and refactored for Envers 4, and further, that listeners no longer need to be registered.  We will likely again be in a scenario with other clients where a database will already be populated and we need to copy that data over to the audit tables.  Is there any way to extend these listeners and register them in our persistence.xml file?