[jboss-cvs] JBossAS SVN: r94004 - projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/cl.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 24 16:25:53 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-09-24 16:25:53 -0400 (Thu, 24 Sep 2009)
New Revision: 94004

Modified:
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/cl/WebBeansFacesIntegrationDeployer.java
Log:
WBINT-28

Modified: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/cl/WebBeansFacesIntegrationDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/cl/WebBeansFacesIntegrationDeployer.java	2009-09-24 19:14:24 UTC (rev 94003)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/cl/WebBeansFacesIntegrationDeployer.java	2009-09-24 20:25:53 UTC (rev 94004)
@@ -1,22 +1,35 @@
 package org.jboss.webbeans.integration.deployer.cl;
 
 
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
 import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.webbeans.integration.deployer.DeployersUtils;
 
 /**
  * Web Beans RI integration deployer.
  *
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ * @author Pete Muir
  */
 public class WebBeansFacesIntegrationDeployer extends WebBeansUrlIntegrationDeployer<JBossWebMetaData>
 {
    public WebBeansFacesIntegrationDeployer()
    {
-      super(JBossWebMetaData.class); // we only look at wars
-      setDisableOptional(true); // it needs to be web deployment, or why would you use JSF?
-      setFiles(new String[]{"META-INF/beans.xml", "WEB-INF/beans.xml"});
+      super(JBossWebMetaData.class);
+      // We do this at top level to ensure that any deployment (ear or war) 
+      // that supports WB gets this integration (even if that particular war doesn't have beans.xml)
+      setTopLevelOnly(true); 
+      setInputs(DeployersUtils.WEB_BEANS_FILES);
+      setIntegrationURLs(getURLs());
    }
 
+   @Override // we override this, as we want any beans.xml
+   protected boolean isIntegrationDeployment(VFSDeploymentUnit unit)
+   {
+      return DeployersUtils.checkForWebBeansFiles(unit);
+   }
+
+   @Override
    protected String getShortLibName()
    {
       return "faces";




More information about the jboss-cvs-commits mailing list