[jboss-as7-dev] Provide access to OSGiMetaData for server, web, etc

Thomas Diesler thomas.diesler at jboss.com
Tue Dec 4 05:02:59 EST 2012


Folks,

currently we have a policy that server does not have a dependency on OSGi API and as a result on OSGiMetaData.

In several places we do a check like this

if (depUnit.hasAttachment(Attachments.OSGI_MANIFEST)) {
  ...
}

This however implies that the Manifest is the only possible source of valid OSGi metadata. The OSGi webapp spec allows for metadata to be specified as part of a "webbundle://" URI (see AS7-6006)
To make this work, the integration code currently generates a Manifest and later OSGiMetaData from it. The above code still works even if the deployment content does not have a Manifest.

I propose to move the OSGiMetaData one level up so that

if (depUnit.hasAttachment(Attachments.OSGI_METADATA)) {
  ...
}

can be the deciding criteria. As a additional benefit web would no longer need to produce/consume the raw Manifest headers and OSGiMetaData would be treated like all other metadata structures.

cheers
--thomas
xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Thomas Diesler
JBoss OSGi Lead
JBoss, a division of Red Hat
xxxxxxxxxxxxxxxxxxxxxxxxxxxx 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-as7-dev/attachments/20121204/f42c6bdb/attachment.html 


More information about the jboss-as7-dev mailing list