12.7.3.2. Set the Auditing Strategy
Summary
There are two audit strategies supported by JBoss EAP 6: the default and validity audit strategies. This task covers the steps required to define the auditing strategy for an application.
Procedure 12.7. Define a Auditing Strategy
- Configure the
org.hibernate.envers.audit_strategy
property in thepersistence.xml
file of the application. If the property is not set in thepersistence.xml
file, then the default audit strategy is used.Example 12.28. Set the Default Audit Strategy
<property name="org.hibernate.envers.audit_strategy" value="org.hibernate.envers.strategy.DefaultAuditStrategy"/>
Example 12.29. Set the Validity Audit Strategy
<property name="org.hibernate.envers.audit_strategy" value="org.hibernate.envers.strategy.ValidityAuditStrategy"/>