Yeah this should work. Is MyRevisionEntity added to and visible to Hibernate? It should be treated as a normal Hibernate entity.
Hi Adam, how are u? fine?
my problem should be the version of hibernate core 3.3 that is not compatible with envers 4.1
so I tried to use envers <version>1.2.1.GA-hibernate-3.3</version> in AS7
but I had the following error:
org.hibernate.event.service.spi.EventListenerRegistrationException: Listener did not implement expected interface [org.hibernate.event.spi.PostCollectionRecreateEventListener]
I'm using Jboss Server 7.1
Hibernate core 3.3.1.GA
1 of 1 people found this helpful
If you are using JB AS 7.1, then you should probably use HIbernate 4 and the corresponding Envers version. The Envers version must always match the Hibernate version.
my project are a module maven project with various modules, so my persistence and entities are different modules.
so I setting this property: org.hibernate.envers.revision_listener, then my Listener work very well.
thanks for you help, Adam
documentation envers 4.0 define:
"You tell Envers your custom
org.hibernate.envers.RevisionListenerimplementation to use by specifying it on the
@org.hibernate.envers.RevisionEntityannotation, using the
valueattribute. If your
RevisionListenerclass is inaccessible from
@RevisionEntity(e.g. exists in a different module), set org.hibernate.envers.revision_listener property to it's fully qualified name. Class name defined by the configuration parameter overrides revision entity's