[jboss-dev-forums] [JBoss AS7 Development] - Re: META-INF/services for module extensions - question/issue

Brian Stansberry do-not-reply at jboss.com
Tue Aug 30 14:14:51 EDT 2011


Brian Stansberry [http://community.jboss.org/people/brian.stansberry] created the discussion

"Re: META-INF/services for module extensions - question/issue"

To view the discussion, visit: http://community.jboss.org/message/623829#623829

--------------------------------------------------------------
Re: making an API / SPI available to other deployments...

See  https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7 for background and details on the following.

A war, ear, or any other deployment can specify a dependency on external modules either by adding a jboss-deployment-structure.xml  in its META-INF dir or by adding a Dependencies: manifest entry in MANIFEST.MF. See "Dependencies: Manifest Entries" and "JBoss Deployment Structure File" in the above doc.

That module can either be one of the modules in the $JBOSS_HOME/modules dir, or it can be a module the AS dynamically creates when a deployment (e.g. a jar containing the API/SPI) is deployed. For modules dynamically created for deployments, the name of the module is "deployment.xxx". See "Deployment Module Names" in the above doc for details on "xxx".

Simple example, if you had a jar "my-spi.jar" that included your SPI, you could deploy it, and then a war that needed visibility to the classes in that module could add this to its META-INF/MANIFEST.MF

Dependencies: deployment.my-spi.jar
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/623829#623829]

Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110830/a7ffacde/attachment.html 


More information about the jboss-dev-forums mailing list