[jboss-cvs] jboss-cvs-commits Digest, Vol 40, Issue 195

Ales Justin ales.justin at gmail.com
Sun Oct 11 15:48:59 EDT 2009


I guess you could already use OSGiMetaData attachment check,
it just wouldn't be type safe, but there would be no need for extra 
String attachment.

e.g.
Object metadata = 
unit.getAttachment("org.jboss.osgi.metadata.OSGiMetaData");
if (metadata != null)
{
    log.debug("Ignore OSGi app: " + metadata);
    return;
}

> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 10 Oct 2009 17:46:00 -0400
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBossAS SVN: r94644 -
> 	branches/Branch_5_x/server/src/main/org/jboss/deployment.
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> 	<200910102146.n9ALk0Ct009365 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
> 
> Author: thomas.diesler at jboss.com
> Date: 2009-10-10 17:45:59 -0400 (Sat, 10 Oct 2009)
> New Revision: 94644
> 
> Modified:
>    branches/Branch_5_x/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java
> Log:
> [JBAS-7322] Disable Tomcat deployment for OSGi webapps
> 
> Modified: branches/Branch_5_x/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java
> ===================================================================
> --- branches/Branch_5_x/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java	2009-10-10 21:43:48 UTC (rev 94643)
> +++ branches/Branch_5_x/server/src/main/org/jboss/deployment/LegacyWebXmlLessDeployer.java	2009-10-10 21:45:59 UTC (rev 94644)
> @@ -56,6 +56,15 @@
>           if (unit instanceof VFSDeploymentUnit == false)
>              return;
>  
> +         // Detect and ignore OSGi WAR deployments
> +         // FIXME Use typed OSGiMetaData when we have it available at runtime
> +         String bundleSymbolicName = (String) unit.getAttachment("org.jboss.osgi.bundle.symbolic.name");
> +         if (bundleSymbolicName != null)
> +         {
> +            log.debug("Ignore OSGi webapp: " + bundleSymbolicName);
> +       	    return;
> +         }
> +         
>           log.debug("Web archive doesn't contain web.xml: " + unit.getName());
>           unit.getTransientManagedObjects().addAttachment(JBossWebMetaData.class, new JBossWebMetaData());
>        }



More information about the jboss-cvs-commits mailing list