Class AppRevisionListener

java.lang.Object
com.softslate.commerce.daos.core.AppRevisionListener
All Implemented Interfaces:
org.hibernate.envers.RevisionListener

public class AppRevisionListener extends Object implements org.hibernate.envers.RevisionListener
Record the sscRequestLog.requestLogID with each Envers revision. From the RequestLog record, you can retrieve the userName, IP address, URL, etc. Request logging must be enabled with the "Log Requests to Database" setting on the Advanced System Settings screen (Enterprise Edition only), otherwise auditing can still be used but null will be written for all requestIDs. To use a different RevisionListener than this, override the "revisionEntityImplementer" property in appComponents-custom.properties with a custom implementation of RevisionEntity, replacing RevisionEntityBean. In the new implementation, use the @RevisionEntity annotation to specify a new listener.
Author:
David Tobey
  • Field Details

    • threadRequestLog

      private static final ThreadLocal threadRequestLog
  • Constructor Details

    • AppRevisionListener

      public AppRevisionListener()
  • Method Details

    • setRequestLogForThread

      public static void setRequestLogForThread(RequestLog rl)
    • newRevision

      public void newRevision(Object revisionEntity)
      Specified by:
      newRevision in interface org.hibernate.envers.RevisionListener