Using Envers with AS7
Join the DZone community and get the full member experience.
Join For FreeRecently I tried deploying a web application which uses Envers into AS7, but unfortunately I encountered some problems (see the forum discussion). Luckily thanks to the helpful JBoss guys I’ve got it working now. Moreover, thanks to the work done by Strong Liu, you should see full Envers integration (included OOTB as a module) in AS7.1!
Until then, here’s how to use Envers in a webapp in AS7.
First, we need to create an Envers module. Create a directory: jboss-as-7.0.0.Final/modules/org/hibernate/envers/main and inside it, create a module.xml with the following content:
Moreover, you’ll need to put the Envers jar inside that directory. You can download it straight from the JBoss Maven repository.
I’ve prepared a ready zip of the module, which can be downloaded here. Just unpack its contents to jboss-as-7.0.0.Final/modules/org/hibernate.
Secondly, you must add an entry in your manifest file (META-INF/MANIFEST.MF) to make the new module available to your application:
And you’re done. Enjoy! :)
From http://www.warski.org/blog/2011/08/using-envers-with-as7/
Opinions expressed by DZone contributors are their own.
Comments