[jboss-as7-dev] Invalid assumption across most subsystem deployments

Thomas Diesler thomas.diesler at jboss.com
Wed Feb 1 10:11:48 EST 2012


I might add that in the long run this distinction will disappear as I 
work on integration at the bottom most layer.

On 02/01/2012 04:04 PM, Thomas Diesler wrote:
> Folks,
>
> here is a friendly reminder that your DUPs must take OSGi deployments 
> into consideration. So if you mark a given DU as of type foo, you must 
> make sure that foo is also supported as an OSGi bundle deployment.
>
> I constantly fix DUPs that assume that every deployment is a module 
> deployment. Here is the latest one
>
>     Caused by: java.lang.NullPointerException
>         at
>     org.jboss.as.jaxrs.deployment.JaxrsScanningProcessor.deploy(JaxrsScanningProcessor.java:101)
>         at
>     org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
>
> Generally, I don't mind fixing those since I cannot assume that you 
> even know/care what an OSGi bundle deployment is ;-)
>
> However, on our way to x.y.z.Final we probably want to avoid these 
> basic errors.
>
> What do you need to do is to check that a given DU does not contain a 
> valid OSGi Manifest before you mark it as "your type"
>
>         public void deploy(final DeploymentPhaseContext phaseContext)
>     throws DeploymentUnitProcessingException {
>             DeploymentUnit deploymentUnit =
>     phaseContext.getDeploymentUnit();
>             if(deploymentUnit.hasAttachment(Attachments.OSGI_MANIFEST)) {
>                 return;
>             }
>            
>     if(deploymentUnit.getName().toLowerCase().endsWith(WAR_EXTENSION)) {
>                 DeploymentTypeMarker.setType(DeploymentType.WAR,
>     deploymentUnit);
>             }
>         }
>
> Please take a minute to review your "entry point" DUP and make sure it 
> ignores OSGi deployments if you are not prepared to handle them.
>
> cheers
> -thomas
>
>
>
>
>
> -- 
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thomas Diesler
> JBoss OSGi Lead
> JBoss, a division of Red Hat
> xxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>
> _______________________________________________
> jboss-as7-dev mailing list
> jboss-as7-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev

-- 
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/20120201/45f32622/attachment.html 


More information about the jboss-as7-dev mailing list