[jboss-as7-dev] Account for OSGi bundles in DeploymentUnitProcessors
Thomas Diesler
thomas.diesler at jboss.com
Wed Mar 16 05:11:18 EDT 2011
Folks,
an OSGi bundle deployment is fundamentally different from an EE
deployment and must be handled by the OSGi subsystem. DUPs that are not
targeted for OSGi bundle deployments must ignore these. Currently the
recommended approach to ignore an OSGi deployment in a DUP is
DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
if(deploymentUnit.hasAttachment(Attachments.OSGI_MANIFEST)) {
return;
}
If you work on some other type of marker attachment, make sure that this
marker is not attached for an OSGi deployment. For the above check to
work, the OSGi manifest processor must come early in the chain. I
changed the order of structure processors to
// STRUCTURE
public static final int STRUCTURE_MOUNT
= 0x0000;
public static final int STRUCTURE_MANIFEST
= 0x0100;
public static final int STRUCTURE_OSGI_MANIFEST
= 0x0200;
public static final int STRUCTURE_RAR
= 0x0300;
...
This relates to a bug related to WAB (Webapp Bundle) deployments
https://issues.jboss.org/browse/JBAS-8940
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/20110316/de74a457/attachment.html
More information about the jboss-as7-dev
mailing list