As a follow-up, I tried adding Envers to a web application deployed on AS7 today, using
Hibernate provided with the AS.
I got some class loading problems though with dom4j. See the forum discussion:
I also tried creating a separate Envers module which would depend on org.hibernate, but
the Hibernate doesn't seem to see the Envers Integrator.
Strong Liu: isn't it something you've prepared a patch for? I don't think it
On Jun 21, 2011, at 8:23 AM, Adam Warski wrote:
On Jun 20, 2011, at 7:56 PM, Scott Marlow wrote:
>> and adding envers into org.hibernate module, means there will no
org.hibernate.envers module, and a (jpa) app's classloader can access org.hibernate
module, right? so it can access envers class too.
> Wrong, just adding envers to org.hibernate (either via a module dependency or the jar
directly) doesn't result in envers being exported from the org.hibernate module.
There is an option to do that, if so desired (via the export="true"). The
better option is knowing whether or not it is needed and dynamically injecting envers only
if it is.
Not sure how it works exactly, but I suppose that if the application declares somehow
that it uses Envers, only then the Envers module should be visible? Looking at the
dependencies tree between Hibernate modules, Envers is a leaf, so in theory it should be
> From what you previously said, I think the dependencies are:
> - Application classes may reference the envers annotation.
> - Application classes may reference Hibernate classes.
> - Hibernate core may reference envers.
> - Hibernate envers may reference Hibernate core.
> Sound right so far?
Well Core doesn't reference Envers in any way.
Envers aside, I think the Integrators should work anyway. Say a user creates his own
Integrator and puts it as part of the application classes - will Hibernate see it on
startup? The same applies to Envers - Hibernate should see the integrator if the module is
hibernate-dev mailing list