[jboss-as7-dev] JBoss modules definition for Envers

Ales Justin ales.justin at gmail.com
Mon Oct 17 09:41:03 EDT 2011


I might miss some detail, but I hope this will help you for now.
(until David comes online) :-)

> I am looking at the org.hibernate modules definition in AS7:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate">
> ...
> - <dependencies>
> ...
>   <module name="org.hibernate.envers" services="import" optional="true" />
>   </dependencies>
> </module>
> 
> Then at envers:
> - <module xmlns="urn:jboss:module:1.0" name="org.hibernate.envers">
> ...
> - <dependencies>
>   <module name="org.hibernate" />
> ...
>   </dependencies>
> </module>
> 
> Are cyclical dependencies allowed?

Yes, as long as there are no exports in those involved modules.

> Also, what's the service="import" clause really about? What's a service in this context?

Afaik, this means you can see dep module' META-INF/services path/dir.

Imo, Envers wants for Hibernate to see this

Skywalker:main alesj$ unzip -c hibernate-envers-4.0.0.CR2.jar META-INF/services/org.hibernate.integrator.spi.Integrator
Archive:  hibernate-envers-4.0.0.CR2.jar
  inflating: META-INF/services/org.hibernate.integrator.spi.Integrator  
org.hibernate.envers.event.EnversIntegrator




More information about the jboss-as7-dev mailing list