On Aug 3, 2011, at 5:44 PM, Strong Liu wrote:
Hi there,
I get envers embedded into as7 :D
see below:
https://github.com/stliu/hibernate-core/tree/classloading
https://github.com/stliu/jboss-as/tree/as7-928-2
1. org.hibernate module and org.hibernate.envers module depends on each other.
2. org.hibernte.envers module automaticly injected into app when it is a jpa project.
3. org.jboss.as.testsuite.integration.jpa.hibernate.envers.BasicEnversTestCase in
as7/testsuite/integration passes
4. use org.hibernate.integrator.internal.ServiceLoader instead java.util.ServiceLoader to
load META-INF/services file
this custom ServiceLoader uses ClassLoaderService.
sounds okay?
Great! :) Can't wait to see it in the main repo ;)
I also managed to make an envers module for AS7, as I already described on the forum. What
you need is a:
* new module with the envers jar and following deps:
<module name="org.hibernate"/>
<module name="org.jboss.logging"/>
<module name="org.dom4j"/>
<module name="javax.api"/>
<module name="javax.persistence.api"/>
<module name="javax.transaction.api"/>
<module name="org.javassist"/>
* Dependencies: org.hibernate.envers services in your META-INF
What I didn't realize before (and that's why I couldn't make it working) is
that the dependencies declaration in the app's meta-inf affects the interaction
between modules.
Still the bundled-envers-only-inside-app scenario doesn't work. But I'm not sure
it's valid any more, as I've got it working in AS7 and you've done the
integration for AS7.1. So do you still need the demo app?
Adam
--
Adam Warski
http://twitter.com/#!/adamwarski
http://www.softwaremill.com
http://www.warski.org