|
Currently, when a user using WildFly wants to include OGM in his bean using the JBoss modules system needs to do the following:
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.hibernate" slot="ogm" services="export" />
<module name="org.hibernate.ogm.<%DATASTORE%>" slot="main" services="export" />
</dependencies>
</deployment>
</jboss-deployment-structure>
It should be possible to omit the datastore line by adding an optional dependecy to the to the available datastore in the core module.
The module.xml in the core module "org.hibernate:ogm" will have these additional entries:
<module name="org.hibernate.ogm.infinispan" optional="true" service="export" />
<module name="org.hibernate.ogm.couchdb" optional="true" />
<module name="org.hibernate.ogm.neo4j" optional="true" />
<module name="org.hibernate.ogm.ehcache" optional="true" />
...
Since they are optional the user can remove form WildFly the modules that he does not need.
|