Author: adamw
Date: 2009-04-30 01:53:15 -0400 (Thu, 30 Apr 2009)
New Revision: 16484
Modified:
core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml
core/trunk/documentation/envers/src/main/docbook/en-US/content/quickstart.xml
Log:
HHH-3879:
- updating the docs with information on default listeners that should be included so that
ejb3 lifecycle callback methods work
Modified:
core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml
===================================================================
---
core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml 2009-04-30
05:47:36 UTC (rev 16483)
+++
core/trunk/documentation/envers/src/main/docbook/en-US/content/configuration.xml 2009-04-30
05:53:15 UTC (rev 16484)
@@ -157,11 +157,11 @@
<!-- other hibernate properties -->
<property name="hibernate.ejb.event.post-insert"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.post-update"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.post-delete"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.pre-collection-update"
value="org.hibernate.envers.event.AuditEventListener" />
<property name="hibernate.ejb.event.pre-collection-remove"
@@ -176,6 +176,11 @@
</persistence-unit></programlisting>
<para>
+ The <literal>EJB3Post...EvenListener</literal>s are needed, so that
ejb3 entity lifecycle callback
+ methods work (<literal>@PostPersist, @PostUpdate,
@PostRemove</literal>.
+ </para>
+
+ <para>
You can also set the name of the audit table on a per-entity basis, using the
<literal>@AuditTable</literal> annotation. It may be tedious to add
this
annotation to every audited entity, so if possible, it's better to use a
prefix/suffix.
Modified: core/trunk/documentation/envers/src/main/docbook/en-US/content/quickstart.xml
===================================================================
---
core/trunk/documentation/envers/src/main/docbook/en-US/content/quickstart.xml 2009-04-30
05:47:36 UTC (rev 16483)
+++
core/trunk/documentation/envers/src/main/docbook/en-US/content/quickstart.xml 2009-04-30
05:53:15 UTC (rev 16484)
@@ -42,11 +42,11 @@
<!-- other hibernate properties -->
<property name="hibernate.ejb.event.post-insert"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.post-update"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.post-delete"
- value="org.hibernate.envers.event.AuditEventListener" />
+
value="org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.AuditEventListener"
/>
<property name="hibernate.ejb.event.pre-collection-update"
value="org.hibernate.envers.event.AuditEventListener" />
<property name="hibernate.ejb.event.pre-collection-remove"
@@ -57,6 +57,11 @@
</persistence-unit></programlisting>
<para>
+ The <literal>EJB3Post...EvenListener</literal>s are needed, so that
ejb3 entity lifecycle callback
+ methods work (<literal>@PostPersist, @PostUpdate,
@PostRemove</literal>.
+ </para>
+
+ <para>
Then, annotate your persistent class with <literal>@Audited</literal>
- this will make all
properties audited. For example:
</para>
Show replies by date