[jboss-cvs] JBossAS SVN: r91873 - in projects/webbeans-ri-int/trunk/deployer/src: main/java/org/jboss/webbeans/integration/deployer/env and 9 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 31 08:34:09 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-07-31 08:34:08 -0400 (Fri, 31 Jul 2009)
New Revision: 91873

Added:
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractBootstrapInfoDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractDeploymentDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/BootstrapInfo.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/EjbServicesDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeployment.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeploymentDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEmptyEjbServices.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockUrlIntegrationDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractDeploymentTest.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/FlatDeploymentTestCase.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/SmokeTestCase.java
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/FlatDeploymentTestCase.xml
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/SmokeTestCase.xml
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/application.properties
Removed:
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java
Modified:
   projects/webbeans-ri-int/trunk/deployer/src/main/assembly/resources/META-INF/webbeans-deployers-jboss-beans.xml
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/WebBeansBootstrapDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/metadata/WebBeansFilesDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/VFSTestSuite.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/WBDEWrapper.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockBootDeployer.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractWebBeansTest.java
   projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/CLIsolationTestCase.java
   projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/BootDeployerTestCase.xml
Log:
merge in Ales' changes

Modified: projects/webbeans-ri-int/trunk/deployer/src/main/assembly/resources/META-INF/webbeans-deployers-jboss-beans.xml
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/assembly/resources/META-INF/webbeans-deployers-jboss-beans.xml	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/assembly/resources/META-INF/webbeans-deployers-jboss-beans.xml	2009-07-31 12:34:08 UTC (rev 91873)
@@ -13,6 +13,12 @@
   <!-- Responsible for discovering Web Bean classes -->
   <bean name="WebBeansDiscoveryDeployer" class="org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer"/>
 
+  <!-- Responsible for discovering Web Bean classes -->
+  <bean name="EjbServicesDeployer" class="org.jboss.webbeans.integration.deployer.env.EjbServicesDeployer"/>
+
+  <!-- Responsible for discovering Web Bean classes -->
+  <bean name="FlatDeploymentDeployer" class="org.jboss.webbeans.integration.deployer.env.FlatDeploymentDeployer"/>
+
   <!-- Responsible for dynamic ejb dependency creation -->
   <bean name="DynamicDependencyCreator" class="org.jboss.webbeans.integration.deployer.env.DynamicDependencyCreator">
     <constructor>

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractBootstrapInfoDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractBootstrapInfoDeployer.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractBootstrapInfoDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webbeans.integration.deployer.DeployersUtils;
+
+/**
+ * Abstract bootstrap info deployer.
+ * Adding and getting info for Bootstrap bean.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractBootstrapInfoDeployer extends AbstractOptionalRealDeployer<BootstrapInfo>
+{
+   protected AbstractBootstrapInfoDeployer(boolean isPassThroughBootstrapInfo)
+   {
+      super(BootstrapInfo.class);
+      setTopLevelOnly(true);
+      setStage(DeploymentStages.PRE_REAL);
+      addInput(DeployersUtils.WEB_BEANS_FILES);
+      if (isPassThroughBootstrapInfo)
+         addOutput(BootstrapInfo.class);
+   }
+
+   public final void deploy(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
+   {
+      boolean doDeploy = (info != null);
+      if (doDeploy == false)
+      {
+         doDeploy = DeployersUtils.checkForWebBeansFiles(unit);
+         if (doDeploy)
+         {
+            // info is null, create one
+            info = new BootstrapInfo();
+            unit.addAttachment(BootstrapInfo.class, info);
+         }
+      }
+      
+      if (doDeploy)
+         deployInternal(unit, info);
+   }
+
+   /**
+    * Do deploy.
+    *
+    * @param unit the deployment unit
+    * @param info non-null bootstrap info
+    * @throws DeploymentException for any error
+    */
+   protected abstract void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException;
+
+   /**
+    * Create service connector.
+    *
+    * @param name the connector name
+    * @param bean the bean to create
+    * @param unit the deployment unit
+    * @return new inject metadata
+    */
+   protected static ValueMetaData createServiceConnector(String name, String bean, DeploymentUnit unit)
+   {
+      String beanName = unit.getName() + "_" + name;
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, bean);
+      builder.setFactory(name);
+      builder.setFactoryMethod("createBean");
+      builder.addPropertyMetaData("deploymentUnit", unit);
+      unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
+      return builder.createInject(beanName);
+   }
+}


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractBootstrapInfoDeployer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractDeploymentDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractDeploymentDeployer.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractDeploymentDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
+
+/**
+ * Abstract Deployment Deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractDeploymentDeployer extends AbstractBootstrapInfoDeployer
+{
+   public AbstractDeploymentDeployer()
+   {
+      super(true);
+      addInput(BootstrapInfo.EJB_SERVICES);
+      addOutput(BootstrapInfo.DEPLOYMENT);
+      addOutput(BeanMetaData.class);
+   }
+
+   public void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
+   {
+      if (info.getEjbServices() == null)
+         throw new DeploymentException("Missing ejb services value: " + unit);
+
+      if (isRelevant(unit) == false)
+         return;
+
+      String unitName = unit.getName();
+      String deploymentName = unitName + "_JBossDeployment";
+
+      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(deploymentName, getDeploymentClass().getName());
+      buildDeployment(unit, info, builder);
+      info.setDeployment(builder.createInject(deploymentName));
+      unit.addAttachment(deploymentName, builder.getBeanMetaData(), BeanMetaData.class);
+   }
+
+   /**
+    * Is this deployer relevant.
+    *
+    * @param unit the deployment unit
+    * @return true if relevant, false otherwise
+    */
+   protected boolean isRelevant(DeploymentUnit unit)
+   {
+      return true;
+   }
+
+   /**
+    * Get deployment impl class.
+    *
+    * @return the deployment class
+    */
+   protected abstract Class<? extends Deployment> getDeploymentClass();
+
+   /**
+    * Build deployment
+    *
+    * @param unit the deployment unit
+    * @param info the bootstrap info
+    * @param builder the bean metadata builder
+    */
+   protected abstract void buildDeployment(DeploymentUnit unit, BootstrapInfo info, BeanMetaDataBuilder builder);}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/AbstractDeploymentDeployer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/BootstrapInfo.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/BootstrapInfo.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/BootstrapInfo.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import org.jboss.beans.metadata.spi.ValueMetaData;
+
+/**
+ * Simple bootstrap info class, used as attachment key.
+ * Holds inject values for deployment and various services.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class BootstrapInfo
+{
+   private ValueMetaData ejbServices;
+   public static final String EJB_SERVICES = BootstrapInfo.class.getSimpleName() + "EJB_SERVICES";
+
+   private ValueMetaData deployment;
+   public static final String DEPLOYMENT = BootstrapInfo.class.getSimpleName() + "DEPLOYMENT";
+
+   public ValueMetaData getDeployment()
+   {
+      return deployment;
+   }
+
+   public void setDeployment(ValueMetaData deployment)
+   {
+      this.deployment = deployment;
+   }
+
+   public ValueMetaData getEjbServices()
+   {
+      return ejbServices;
+   }
+
+   public void setEjbServices(ValueMetaData ejbServices)
+   {
+      this.ejbServices = ejbServices;
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/BootstrapInfo.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/EjbServicesDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/EjbServicesDeployer.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/EjbServicesDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import org.jboss.beans.metadata.spi.ValueMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * EjbServices Deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class EjbServicesDeployer extends AbstractBootstrapInfoDeployer
+{
+   /** The ejb services class name */
+   private String ejbServicesClassName = "org.jboss.webbeans.integration.ejb.JBossEjbServices";
+
+   public EjbServicesDeployer()
+   {
+      super(true);
+      addOutput(BootstrapInfo.EJB_SERVICES);
+   }
+
+   public void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
+   {
+      ValueMetaData ejbServicesValue = createServiceConnector("JBossEjbServices", ejbServicesClassName, unit);
+      info.setEjbServices(ejbServicesValue);
+   }
+
+   /**
+    * Set ejb services class name.
+    *
+    * @param ejbServicesClassName the ejb services classname
+    */
+   public void setEjbServicesClassName(String ejbServicesClassName)
+   {
+      this.ejbServicesClassName = ejbServicesClassName;
+   }
+}


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/EjbServicesDeployer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeployment.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeployment.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeployment.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
+import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+
+/**
+ * Initial (naive) implementation of Deployment for JBoss AS.
+ *
+ * This version simply flattens the entire deployment into a single
+ * BeanDeploymentArchive
+ *
+ * @author pmuir
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class FlatDeployment implements Deployment
+{
+   private final BeanDeploymentArchive beanDeploymentArchive;
+   private final List<BeanDeploymentArchive> beanDeploymentArchives;
+
+   public FlatDeployment(WebBeanDiscoveryEnvironment environment, Iterable<EjbDescriptor<?>> ejbDescriptors)
+   {
+      this.beanDeploymentArchive = new JBossBeanDeploymentArchive(environment, ejbDescriptors);
+      this.beanDeploymentArchives = Collections.singletonList(beanDeploymentArchive);
+   }
+
+   public List<BeanDeploymentArchive> getBeanDeploymentArchives()
+   {
+      return beanDeploymentArchives;
+   }
+
+   public BeanDeploymentArchive loadBeanDeploymentArchive(Class<?> beanClass)
+   {
+      return beanDeploymentArchive;
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeployment.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeploymentDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeploymentDeployer.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeploymentDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webbeans.integration.deployer.env;
+
+import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
+
+/**
+ * Flat Deployment Deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class FlatDeploymentDeployer extends AbstractDeploymentDeployer
+{
+   public FlatDeploymentDeployer()
+   {
+      super();
+      addInput(WebBeanDiscoveryEnvironment.class);
+   }
+
+   @Override
+   protected boolean isRelevant(DeploymentUnit unit)
+   {
+      return unit.isAttachmentPresent(WebBeanDiscoveryEnvironment.class);
+   }
+
+   protected Class<? extends Deployment> getDeploymentClass()
+   {
+      return FlatDeployment.class;
+   }
+
+   protected void buildDeployment(DeploymentUnit unit, BootstrapInfo info, BeanMetaDataBuilder builder)
+   {
+      WebBeanDiscoveryEnvironment env = unit.getAttachment(WebBeanDiscoveryEnvironment.class);
+      builder.addConstructorParameter(WebBeanDiscoveryEnvironment.class.getName(), env);
+      builder.addConstructorParameter(Iterable.class.getName(), builder.createInject(info.getEjbServices().getUnderlyingValue(), "ejbs"));
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/FlatDeploymentDeployer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/WebBeansBootstrapDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/WebBeansBootstrapDeployer.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/env/WebBeansBootstrapDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -27,8 +27,6 @@
 import org.jboss.beans.metadata.spi.builder.ParameterMetaDataBuilder;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
 import org.jboss.webbeans.bootstrap.api.Bootstrap;
 import org.jboss.webbeans.bootstrap.api.Environments;
@@ -41,38 +39,33 @@
  *
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
-public class WebBeansBootstrapDeployer extends AbstractSimpleRealDeployer<WebBeanDiscoveryEnvironment>
+public class WebBeansBootstrapDeployer extends AbstractBootstrapInfoDeployer
 {
    public WebBeansBootstrapDeployer()
    {
-      super(WebBeanDiscoveryEnvironment.class);
-      setTopLevelOnly(true);
-      setStage(DeploymentStages.PRE_REAL);
+      super(false);
+      setDisableOptional(true);
       addOutput(BeanMetaData.class);
    }
 
-   @Override
-   public void deploy(DeploymentUnit unit, WebBeanDiscoveryEnvironment env) throws DeploymentException
+   protected void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
    {
-      String unitName = unit.getName();
-      String envName = unitName + "_JBossDeployment";
-      
-      ValueMetaData ejbServicesValue = createEjbConnector("JBossEjbServices", "org.jboss.webbeans.integration.ejb.JBossEjbServices", unit);
-      
+      ValueMetaData ejbServicesValue = info.getEjbServices();
+      if (ejbServicesValue == null)
+         throw new DeploymentException("Missing ejb services: " + unit);
+
+      ValueMetaData deploymentValue = info.getDeployment();
+      if (deploymentValue == null)
+         throw new DeploymentException("Missing deployment: " + unit);
+
       String bootstrapName = DeployersUtils.getBootstrapBeanName(unit);
       BeanMetaDataBuilder bootstrap = BeanMetaDataBuilder.createBuilder(bootstrapName, "org.jboss.webbeans.bootstrap.api.helpers.BootstrapBean");
       
-      BeanMetaDataBuilder envWrapper = BeanMetaDataBuilder.createBuilder(envName, "org.jboss.webbeans.integration.deployer.env.JBossDeployment");
-      envWrapper.addConstructorParameter(WebBeanDiscoveryEnvironment.class.getName(), env);
-      envWrapper.addConstructorParameter(Iterable.class.getName(), bootstrap.createInject(ejbServicesValue.getUnderlyingValue(), "ejbs"));
-      unit.addAttachment(envName + "_" + BeanMetaData.class.getSimpleName(), envWrapper.getBeanMetaData());
-
-      
       bootstrap.addConstructorParameter(Bootstrap.class.getName(), createBootstrap(unit));
-      bootstrap.addPropertyMetaData("deployment", bootstrap.createInject(envName));
+      bootstrap.addPropertyMetaData("deployment", deploymentValue);
       
       bootstrap.addPropertyMetaData("ejbServices", ejbServicesValue);
-      bootstrap.addPropertyMetaData("jpaServices", createEjbConnector("JBossJpaServices", "org.jboss.webbeans.integration.persistence.JBossJpaServices", unit));
+      bootstrap.addPropertyMetaData("jpaServices", createServiceConnector("JBossJpaServices", "org.jboss.webbeans.integration.persistence.JBossJpaServices", unit));
       bootstrap.addPropertyMetaData("resourceServices", bootstrap.createInject("JBossResourceServices"));
       bootstrap.addPropertyMetaData("webServices", bootstrap.createInject("JBossWebServices"));
       bootstrap.addPropertyMetaData("jmsServices", bootstrap.createInject("JBossJmsServices"));
@@ -105,25 +98,6 @@
    }
 
    /**
-    * Create ejb connector.
-    *
-    * @param name the connector name
-    * @param bean the bean to create
-    * @param unit the deployment unit
-    * @return new inject metadata
-    */
-   protected ValueMetaData createEjbConnector(String name, String bean, DeploymentUnit unit)
-   {
-      String beanName = unit.getName() + "_" + name;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, bean);
-      builder.setFactory(name);
-      builder.setFactoryMethod("createBean");
-      builder.addPropertyMetaData("deploymentUnit", unit);
-      unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
-      return builder.createInject(beanName);
-   }
-
-   /**
     * Create bootstrap bean.
     *
     * @param unit the deployment unit

Modified: projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/metadata/WebBeansFilesDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/metadata/WebBeansFilesDeployer.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/main/java/org/jboss/webbeans/integration/deployer/metadata/WebBeansFilesDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -95,7 +95,6 @@
       {
          throw DeploymentException.rethrowAsDeploymentException("Cannot WBD files/classpath.", e);
       }
-
    }
 
    /**

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/VFSTestSuite.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/VFSTestSuite.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/VFSTestSuite.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -25,9 +25,11 @@
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 import org.jboss.test.deployers.test.BootDeployerTestCase;
+import org.jboss.test.deployers.test.CLIsolationTestCase;
+import org.jboss.test.deployers.test.FlatDeploymentTestCase;
+import org.jboss.test.deployers.test.SmokeTestCase;
+import org.jboss.test.deployers.test.WBDiscoveryEnvTestCase;
 import org.jboss.test.deployers.test.PostDeployersTestCase;
-import org.jboss.test.deployers.test.WBDiscoveryEnvTestCase;
-import org.jboss.test.deployers.test.CLIsolationTestCase;
 
 /**
  * VFS deployers tests.
@@ -45,11 +47,20 @@
    {
       TestSuite suite = new TestSuite("Deployers WebBeans Tests");
 
-      suite.addTest(WBDiscoveryEnvTestCase.suite());
+      // Smoke
+      suite.addTest(SmokeTestCase.suite());
+
+      // Post metadata modification
       suite.addTest(PostDeployersTestCase.suite());
-      suite.addTest(BootDeployerTestCase.suite());
       suite.addTest(CLIsolationTestCase.suite());
 
+      // Bootstrap creation
+      suite.addTest(WBDiscoveryEnvTestCase.suite());
+      suite.addTest(FlatDeploymentTestCase.suite());
+
+      // Bootstrap bean
+      suite.addTest(BootDeployerTestCase.suite());
+
       return suite;
    }
 }

Deleted: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -1,80 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.test.deployers.support;
-
-import java.util.Collections;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.webbeans.ejb.api.SessionObjectReference;
-import org.jboss.webbeans.ejb.spi.EjbDescriptor;
-import org.jboss.webbeans.ejb.spi.EjbServices;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public class MockEjbServices implements EjbServices
-{
-   public void setDeploymentUnit(DeploymentUnit unit)
-   {
-   }
-   
-   public Object resolveEjb(InjectionPoint injectionPoint)
-   {
-      return null;
-   }
-
-   public Object resolvePersistenceContext(InjectionPoint injectionPoint)
-   {
-      return null;
-   }
-
-   public Object resolveResource(InjectionPoint injectionPoint)
-   {
-      return null;
-   }
-   
-   public void removeEjb(Object instance)
-   {
-   }
-
-   public SessionObjectReference resolveEjb(EjbDescriptor<?> descriptor)
-   {
-      return null;
-   }
-   
-   public Iterable<EjbDescriptor<?>> discoverEjbs()
-   {
-      return Collections.emptySet();
-   }
-
-   public Object resolveRemoteEjb(String jndiName, String mappedName, String ejbLink) 
-   {
-      return null;
-   }
-   
-   public Iterable<String> getEjbContainerNames()
-   {
-	   return Collections.singleton("EjbContainer#1");
-   }
-}

Added: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.support;
+
+import java.util.Collections;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webbeans.ejb.api.SessionObjectReference;
+import org.jboss.webbeans.ejb.spi.EjbDescriptor;
+import org.jboss.webbeans.ejb.spi.EjbServices;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class MockEjbServices implements EjbServices
+{
+   public void setDeploymentUnit(DeploymentUnit unit)
+   {
+   }
+
+   public Object resolveEjb(InjectionPoint injectionPoint)
+   {
+      return null;
+   }
+
+   public Object resolvePersistenceContext(InjectionPoint injectionPoint)
+   {
+      return null;
+   }
+
+   public Object resolveResource(InjectionPoint injectionPoint)
+   {
+      return null;
+   }
+
+   public void removeEjb(Object instance)
+   {
+   }
+
+   public SessionObjectReference resolveEjb(EjbDescriptor<?> descriptor)
+   {
+      return null;
+   }
+
+   public Iterable<EjbDescriptor<?>> getEjbs()
+   {
+      return Collections.emptySet();
+   }
+
+   public Object resolveRemoteEjb(String jndiName, String mappedName, String ejbLink)
+   {
+      return null;
+   }
+
+   public Iterable<String> getEjbContainerNames()
+   {
+	   return Collections.singleton("EjbContainer#1");
+   }
+}


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Copied: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEmptyEjbServices.java (from rev 91871, projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEjbServices.java)
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEmptyEjbServices.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/MockEmptyEjbServices.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.support;
+
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class MockEmptyEjbServices extends MockEjbServices
+{
+   public Iterable<String> getEjbContainerNames()
+   {
+	   return Collections.emptySet();
+   }
+}
\ No newline at end of file

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/WBDEWrapper.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/WBDEWrapper.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/WBDEWrapper.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -22,29 +22,47 @@
 package org.jboss.test.deployers.support;
 
 import java.net.URL;
+import java.util.List;
+import java.util.Set;
+import java.util.HashSet;
 
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
 import org.jboss.webbeans.bootstrap.spi.WebBeanDiscovery;
-import org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryEnvironment;
 
 /**
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
 public class WBDEWrapper implements WebBeanDiscovery
 {
-   protected final WebBeanDiscoveryEnvironment environment;
+   protected final Deployment deployment;
 
-   public WBDEWrapper(WebBeanDiscoveryEnvironment environment)
+   public WBDEWrapper(Deployment deployment)
    {
-      this.environment = environment;
+      this.deployment = deployment;
    }
 
    public Iterable<Class<?>> discoverWebBeanClasses()
    {
-      return environment.getWebBeanClasses();
+      Set<Class<?>> result = new HashSet<Class<?>>();
+      List<BeanDeploymentArchive> bdas = deployment.getBeanDeploymentArchives();
+      for (BeanDeploymentArchive bda : bdas)
+      {
+         for (Class<?> clazz : bda.getBeanClasses())
+            result.add(clazz);
+      }
+      return result;
    }
 
    public Iterable<URL> discoverWebBeansXml()
    {
-      return environment.getWebBeansXml();
+      Set<URL> result = new HashSet<URL>();
+      List<BeanDeploymentArchive> bdas = deployment.getBeanDeploymentArchives();
+      for (BeanDeploymentArchive bda : bdas)
+      {
+         for (URL url : bda.getBeansXml())
+            result.add(url);
+      }
+      return result;
    }
 }
\ No newline at end of file

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockBootDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockBootDeployer.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockBootDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -25,43 +25,49 @@
 import org.jboss.beans.metadata.spi.ValueMetaData;
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.beans.metadata.spi.builder.ParameterMetaDataBuilder;
+import org.jboss.dependency.spi.ControllerState;
 import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
 import org.jboss.webbeans.context.api.BeanStore;
 import org.jboss.webbeans.context.api.helpers.ConcurrentHashMapBeanStore;
 import org.jboss.webbeans.integration.deployer.DeployersUtils;
-import org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryEnvironment;
-import org.jboss.dependency.spi.ControllerState;
+import org.jboss.webbeans.integration.deployer.env.AbstractBootstrapInfoDeployer;
+import org.jboss.webbeans.integration.deployer.env.BootstrapInfo;
 
 /**
  * Mock wb boot deployer.
  * 
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
-public class MockBootDeployer extends AbstractSimpleRealDeployer<WebBeanDiscoveryEnvironment>
+public class MockBootDeployer extends AbstractBootstrapInfoDeployer
 {
    public MockBootDeployer()
    {
-      super(WebBeanDiscoveryEnvironment.class);
-      setTopLevelOnly(true);
-      setStage(DeploymentStages.PRE_REAL);
+      super(false);
+      setDisableOptional(true);
       addOutput(BeanMetaData.class);
    }
 
-   public void deploy(DeploymentUnit unit, WebBeanDiscoveryEnvironment env) throws DeploymentException
+   public void deployInternal(DeploymentUnit unit, BootstrapInfo info) throws DeploymentException
    {
+      ValueMetaData ejbServicesValue = info.getEjbServices();
+      if (ejbServicesValue == null)
+         throw new DeploymentException("Missing ejb services: " + unit);
+
+      ValueMetaData deploymentValue = info.getDeployment();
+      if (deploymentValue == null)
+         throw new DeploymentException("Missing deployment: " + unit);
+
       String unitName = unit.getName();
       String envName = unitName + "_JBossWebBeanDiscovery";
       BeanMetaDataBuilder envWrapper = BeanMetaDataBuilder.createBuilder(envName, "org.jboss.test.deployers.support.WBDEWrapper");
-      envWrapper.addConstructorParameter(WebBeanDiscoveryEnvironment.class.getName(), env);
+      envWrapper.addConstructorParameter(Deployment.class.getName(), deploymentValue);
       unit.addAttachment(envName + "_" + BeanMetaData.class.getSimpleName(), envWrapper.getBeanMetaData());
 
       String bootstrapName = DeployersUtils.getBootstrapBeanName(unit);
       BeanMetaDataBuilder bootstrap = BeanMetaDataBuilder.createBuilder(bootstrapName, "org.jboss.test.deployers.support.MockWBBootstrap");
       bootstrap.addPropertyMetaData("webBeanDiscovery", bootstrap.createInject(envName));
-      ValueMetaData ejbServicesValue = createEjbConnector("JBossEjbServices", "org.jboss.test.deployers.support.MockEjbServices", unit);
       bootstrap.addPropertyMetaData("ejbServices", ejbServicesValue);
       bootstrap.addPropertyMetaData("transactionServices", bootstrap.createInject("JBossTransactionServices"));
       bootstrap.addPropertyMetaData("applicationContext", createBeanStore());
@@ -88,23 +94,4 @@
    {
       return new ConcurrentHashMapBeanStore();
    }
-
-   /**
-    * Create ejb connector.
-    *
-    * @param name the connector name
-    * @param bean the bean to create
-    * @param unit the deployment unit
-    * @return new inject metadata
-    */
-   protected ValueMetaData createEjbConnector(String name, String bean, DeploymentUnit unit)
-   {
-      String beanName = unit.getName() + "_" + name;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilder.createBuilder(beanName, bean);
-      builder.setFactory(name);
-      builder.setFactoryMethod("createBean");
-      builder.addPropertyMetaData("deploymentUnit", unit);
-      unit.addAttachment(beanName + "_" + BeanMetaData.class.getSimpleName(), builder.getBeanMetaData());
-      return builder.createInject(beanName);
-   }
 }

Added: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockUrlIntegrationDeployer.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockUrlIntegrationDeployer.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockUrlIntegrationDeployer.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.support.deployer;
+
+import java.net.URL;
+import java.util.Collections;
+import java.util.Set;
+
+import org.jboss.webbeans.integration.deployer.cl.WebBeansUrlIntegrationDeployer;
+import org.jboss.webbeans.integration.deployer.ext.JBossWebBeansMetaData;
+
+/**
+ * Mock war classloader deployer.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class MockUrlIntegrationDeployer extends WebBeansUrlIntegrationDeployer<JBossWebBeansMetaData>
+{
+   public MockUrlIntegrationDeployer()
+   {
+      super(JBossWebBeansMetaData.class);
+   }
+
+   protected String getShortLibName()
+   {
+      return "<ignore>";
+   }
+
+   @Override
+   protected Set<URL> getURLs()
+   {
+      try
+      {
+         URL url = getClass().getProtectionDomain().getCodeSource().getLocation();
+         return Collections.singleton(url);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/support/deployer/MockUrlIntegrationDeployer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractDeploymentTest.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractDeploymentTest.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractDeploymentTest.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.test;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.test.deployers.support.MockEmptyEjbServices;
+import org.jboss.test.deployers.support.crm.CrmWebBean;
+import org.jboss.test.deployers.support.ejb.BusinessInterface;
+import org.jboss.test.deployers.support.ejb.MySLSBean;
+import org.jboss.test.deployers.support.ext.ExternalWebBean;
+import org.jboss.test.deployers.support.jar.PlainJavaBean;
+import org.jboss.test.deployers.support.ui.UIWebBean;
+import org.jboss.test.deployers.support.web.ServletWebBean;
+import org.jboss.virtual.AssembledDirectory;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.webbeans.bootstrap.spi.Deployment;
+import org.jboss.webbeans.integration.deployer.DeployersUtils;
+
+/**
+ * Abstract Deployment test case.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractDeploymentTest extends AbstractWebBeansTest
+{
+   protected AbstractDeploymentTest(String name)
+   {
+      super(name);
+   }
+
+   protected void getArchives(List<BeanDeploymentArchive> result, List<BeanDeploymentArchive> archives)
+   {
+      for (BeanDeploymentArchive bda : archives)
+      {
+         result.add(bda);
+         getArchives(result, bda.getBeanDeploymentArchives());
+      }
+   }
+
+   protected abstract int getExpectedArchives();
+
+   public void testSimpleUsage() throws Exception
+   {
+      AssembledDirectory ear = createBasicEar(MockEmptyEjbServices.class);
+      VFSDeploymentUnit topUnit = assertDeploy(ear);
+      try
+      {
+         assertBean(DeployersUtils.getBootstrapBeanName(topUnit), null, Object.class);
+
+         Object bean = getBean(Deployment.class);
+         Deployment deployment = assertInstanceOf(bean, Deployment.class, false);
+
+         List<BeanDeploymentArchive> archives = new ArrayList<BeanDeploymentArchive>();
+         getArchives(archives, deployment.getBeanDeploymentArchives());
+         assertEquals(getExpectedArchives(), archives.size());
+
+         List<URL> urls = new ArrayList<URL>();
+         List<Class<?>> classes = new ArrayList<Class<?>>();
+         for (BeanDeploymentArchive bad : archives)
+         {
+            for (URL url : bad.getBeansXml())
+               urls.add(url);
+            for (Class<?> clazz : bad.getBeanClasses())
+               classes.add(clazz);
+         }
+
+         Set<String> expected = new HashSet<String>();
+         addExpectedResource(expected, "ejbs.jar");
+         addExpectedResource(expected, "ext.jar");
+         addExpectedResource(expected, "simple.jar");
+         addExpectedResource(expected, "ui.jar");
+         addExpectedResource(expected, "crm.jar");
+         addExpectedResource(expected, "simple.war", "/WEB-INF/beans.xml");
+
+         assertEquals("Illegal size or urls.", urls.size(), expected.size());
+
+         for (URL url : urls)
+         {
+            boolean found = false;
+            Iterator<String> iter = expected.iterator();
+            while (iter.hasNext())
+            {
+               String expectedURL = iter.next();
+               if (url.toExternalForm().contains(expectedURL))
+               {
+                  iter.remove();
+                  found = true;
+                  break;
+               }
+            }
+            assertTrue("Unexpected wb url: " + url, found);
+         }
+
+         addExpectedClass(expected, BusinessInterface.class);
+         addExpectedClass(expected, MySLSBean.class);
+         addExpectedClass(expected, ExternalWebBean.class);
+         addExpectedClass(expected, PlainJavaBean.class);
+         addExpectedClass(expected, UIWebBean.class);
+         addExpectedClass(expected, ServletWebBean.class);
+         addExpectedClass(expected, CrmWebBean.class);
+
+         assertEquals("Illegal size or classes.", classes.size(), expected.size());
+
+         for (Class<?> clazz : classes)
+            assertTrue(expected.remove(clazz.getName()));
+
+         assertEmpty("Should be emtpy, missing " + expected, expected);
+
+         Class<?> newBeanClass = topUnit.getClassLoader().loadClass("org.jboss.test.deployers.support.MockTransactionServices");
+         BeanDeploymentArchive newBDA = deployment.loadBeanDeploymentArchive(newBeanClass);
+         assertNewBeanDeploymentArchive(archives, newBDA);
+      }
+      finally
+      {
+         undeploy(topUnit);
+      }
+   }
+
+   protected abstract void assertNewBeanDeploymentArchive(List<BeanDeploymentArchive> archives, BeanDeploymentArchive newBDA);
+
+   private static void addExpectedResource(Set<String> expected, String unit)
+   {
+      addExpectedResource(expected, unit, "/META-INF/beans.xml");
+   }
+
+   private static void addExpectedResource(Set<String> expected, String unit, String suffix)
+   {
+      expected.add(unit + suffix);
+   }
+
+   private static void addExpectedClass(Set<String> expected, Class<?> clazz)
+   {
+      expected.add(clazz.getName());
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractDeploymentTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractWebBeansTest.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractWebBeansTest.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/AbstractWebBeansTest.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -73,8 +73,13 @@
 
    protected AssembledDirectory createBasicEar() throws Exception
    {
-      AssembledDirectory ear = createTopLevelWithUtil();
+      return createBasicEar(SomeUtil.class);
+   }
 
+   protected AssembledDirectory createBasicEar(Class<?> utilClass) throws Exception
+   {
+      AssembledDirectory ear = createTopLevelWithUtil(utilClass);
+
       AssembledDirectory jar = ear.mkdir("simple.jar");
       addPackage(jar, PlainJavaBean.class);
       addPath(jar, "/webbeans/simple/jar", "META-INF");
@@ -115,18 +120,28 @@
 
    protected AssembledDirectory createTopLevelWithUtil() throws Exception
    {
-      return createTopLevelWithUtil("/webbeans/simple");   
+      return createTopLevelWithUtil("/webbeans/simple");
    }
 
+   protected AssembledDirectory createTopLevelWithUtil(Class<?> utilClass) throws Exception
+   {
+      return createTopLevelWithUtil("/webbeans/simple", utilClass);
+   }
+
    protected AssembledDirectory createTopLevelWithUtil(String path) throws Exception
    {
+      return createTopLevelWithUtil(path, SomeUtil.class);
+   }
+
+   protected AssembledDirectory createTopLevelWithUtil(String path, Class<?> utilClass) throws Exception
+   {
       AssembledDirectory topLevel = createAssembledDirectory("top-level.ear", "top-level.ear");
       addPath(topLevel, path, "META-INF");
 
       AssembledDirectory earLib = topLevel.mkdir("lib");
 
       AssembledDirectory util = earLib.mkdir("util.jar");
-      addPackage(util, SomeUtil.class);
+      addPackage(util, utilClass);
 
       AssembledDirectory ext = earLib.mkdir("ext.jar");
       addPackage(ext, ExternalWebBean.class);

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/CLIsolationTestCase.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/CLIsolationTestCase.java	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/CLIsolationTestCase.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -85,7 +85,6 @@
          mainDeployer.removeDeployment(deployment1);
          mainDeployer.process();
       }
-
    }
 
    public void testTwoEars() throws Exception

Added: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/FlatDeploymentTestCase.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/FlatDeploymentTestCase.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/FlatDeploymentTestCase.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.test;
+
+import java.util.List;
+
+import junit.framework.Test;
+import org.jboss.webbeans.bootstrap.spi.BeanDeploymentArchive;
+
+/**
+ * Flat Deployment test case.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class FlatDeploymentTestCase extends AbstractDeploymentTest
+{
+   public FlatDeploymentTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(FlatDeploymentTestCase.class);
+   }
+
+   protected int getExpectedArchives()
+   {
+      return 1; // flat only
+   }
+
+   protected void assertNewBeanDeploymentArchive(List<BeanDeploymentArchive> archives, BeanDeploymentArchive newBDA)
+   {
+      assertSame(newBDA, archives.iterator().next());
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/FlatDeploymentTestCase.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/SmokeTestCase.java
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/SmokeTestCase.java	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/SmokeTestCase.java	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,112 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.test;
+
+import junit.framework.Test;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.client.spi.DeployerClient;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.test.deployers.support.jar.PlainJavaBean;
+import org.jboss.virtual.AssembledDirectory;
+import org.jboss.virtual.VirtualFile;
+import org.jboss.webbeans.integration.deployer.DeployersUtils;
+
+/**
+ * Smoke tests.
+ * Test non WB deployments work OK.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class SmokeTestCase extends AbstractWebBeansTest
+{
+   public SmokeTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(SmokeTestCase.class);
+   }
+
+   protected void testDeployment(VirtualFile app) throws Exception
+   {
+      Deployment deployment = createVFSDeployment(app);
+
+      DeployerClient mainDeployer = getDeployerClient();
+      mainDeployer.addDeployment(deployment);
+      mainDeployer.process();
+      try
+      {
+         DeploymentUnit du = getMainDeployerStructure().getDeploymentUnit(deployment.getName());
+         ControllerContext context = du.getAttachment(ControllerContext.class);
+         assertNotNull(context);
+         assertEquals(ControllerState.INSTALLED, context.getState());
+
+         // There should be no WB bootstrap bean
+         assertNoBean(DeployersUtils.getBootstrapBeanName(du), null);
+      }
+      finally
+      {
+         mainDeployer.removeDeployment(deployment);
+         mainDeployer.process();
+      }
+   }
+
+   public void testEar() throws Exception
+   {
+      AssembledDirectory ear = createAssembledDirectory("jar-in-ear.ear", "jar-in-ear.ear");
+      addPath(ear, "/webbeans/jarwarinear", "META-INF");
+
+      AssembledDirectory jar = ear.mkdir("simple.jar");
+      addPackage(jar, PlainJavaBean.class);
+
+      AssembledDirectory war = ear.mkdir("simple.war");
+      AssembledDirectory webinf = war.mkdir("WEB-INF");
+      AssembledDirectory classes = webinf.mkdir("classes");
+      addPackage(classes, PlainJavaBean.class);
+      addPath(war, "/webbeans/warwowb/web", "WEB-INF");
+
+      testDeployment(ear);
+   }
+
+   public void testWar() throws Exception
+   {
+      AssembledDirectory war = createAssembledDirectory("w1.war", "w1.war");
+      AssembledDirectory webinf = war.mkdir("WEB-INF");
+      AssembledDirectory classes = webinf.mkdir("classes");
+      addPackage(classes, PlainJavaBean.class);
+      addPath(war, "/webbeans/warwowb/web", "WEB-INF");
+
+      testDeployment(war);
+   }
+
+   public void testJar() throws Exception
+   {
+      AssembledDirectory jar = createAssembledDirectory("j1.jar", "j1.jar");
+      addPackage(jar, PlainJavaBean.class);
+
+      testDeployment(jar);
+   }
+}
\ No newline at end of file


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/java/org/jboss/test/deployers/test/SmokeTestCase.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/BootDeployerTestCase.xml
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/BootDeployerTestCase.xml	2009-07-31 11:16:17 UTC (rev 91872)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/BootDeployerTestCase.xml	2009-07-31 12:34:08 UTC (rev 91873)
@@ -17,6 +17,12 @@
   <bean name="WarCLDeployer" class="org.jboss.test.deployers.support.deployer.MockWarClassLoaderDeployer"/>
   <bean name="MockUrlIntDeployer" class="org.jboss.test.deployers.support.deployer.MockCoreIntegrationDeployer"/>
 
+  <bean name="EjbServicesDeployer" class="org.jboss.webbeans.integration.deployer.env.EjbServicesDeployer">
+    <property name="ejbServicesClassName">org.jboss.test.deployers.support.MockEjbServices</property>
+  </bean>
+
+  <bean name="DeploymentDeployer" class="org.jboss.webbeans.integration.deployer.env.FlatDeploymentDeployer"/>
+
   <bean name="BootDeployer" class="org.jboss.test.deployers.support.deployer.MockBootDeployer"/>
 
   <!-- Mock EJB utils -->

Added: projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/FlatDeploymentTestCase.xml
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/FlatDeploymentTestCase.xml	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/FlatDeploymentTestCase.xml	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,30 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
+  <bean name="WarStructure" class="org.jboss.test.deployers.vfs.structure.war.support.MockWarStructureDeployer"/>
+
+  <bean name="JWBMDDeployer" class="org.jboss.webbeans.integration.deployer.ext.JBossWebBeansMetaDataDeployer"/>
+  <bean name="WBFilesDeployer" class="org.jboss.webbeans.integration.deployer.metadata.WebBeansFilesDeployer"/>
+  <bean name="WBDiscoveryDeployer" class="org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer"/>
+
+  <beanfactory name="JBossEjbServices" class="org.jboss.test.deployers.support.MockEmptyEjbServices"/>
+
+  <bean name="EjbServicesDeployer" class="org.jboss.webbeans.integration.deployer.env.EjbServicesDeployer">
+    <property name="ejbServicesClassName">org.jboss.test.deployers.support.MockEmptyEjbServices</property>
+  </bean>
+
+  <bean name="DeploymentDeployer" class="org.jboss.webbeans.integration.deployer.env.FlatDeploymentDeployer"/>
+
+  <bean name="BootDeployer" class="org.jboss.test.deployers.support.deployer.MockBootDeployer"/>
+
+  <bean name="DynamicDependencyCreator" class="org.jboss.webbeans.integration.deployer.env.DynamicDependencyCreator">
+    <constructor>
+      <parameter><inject bean="jboss.kernel:service=KernelController"/></parameter>
+    </constructor>
+  </bean>
+
+  <bean name="JBossTransactionServices" class="org.jboss.test.deployers.support.MockTransactionServices"/>
+
+  <bean name="RealTransactionManager" class="java.lang.Object"/>
+
+</deployment>


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/FlatDeploymentTestCase.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/SmokeTestCase.xml
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/SmokeTestCase.xml	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/SmokeTestCase.xml	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,58 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <!-- Structure mocks -->
+
+  <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
+  <bean name="WarStructure" class="org.jboss.test.deployers.vfs.structure.war.support.MockWarStructureDeployer"/>
+
+  <!-- Mock metadata deployer -->
+
+  <bean name="JBAppMDDeployer" class="org.jboss.test.deployers.support.deployer.MockJBossAppDeployer"/>
+  <bean name="JBWMDDeployer" class="org.jboss.test.deployers.support.deployer.MockWebDeployer"/>
+  <bean name="EjbJarDeployer" class="org.jboss.test.deployers.support.deployer.MockEjbJarDeployer"/>
+  <bean name="EjbMergeDeployer" class="org.jboss.test.deployers.support.deployer.MockCopyJBossDeployer"/>
+  <bean name="WarCLDeployer" class="org.jboss.test.deployers.support.deployer.MockWarClassLoaderDeployer"/>
+
+  <!-- Web Beans deployers -->
+
+  <!-- Responsible for discovering Web Bean files -->
+  <bean name="WebBeansFilesDeployer" class="org.jboss.webbeans.integration.deployer.metadata.WebBeansFilesDeployer"/>
+
+  <!-- Responsible for discovering Web Bean classes -->
+  <bean name="WebBeansDiscoveryDeployer" class="org.jboss.webbeans.integration.deployer.env.WebBeanDiscoveryDeployer"/>
+
+  <!-- Responsible for discovering Web Bean classes -->
+  <bean name="EjbServicesDeployer" class="org.jboss.webbeans.integration.deployer.env.EjbServicesDeployer"/>
+
+  <!-- Responsible for discovering Web Bean classes -->
+  <bean name="FlatDeploymentDeployer" class="org.jboss.webbeans.integration.deployer.env.FlatDeploymentDeployer"/>
+
+  <!-- Responsible for dynamic ejb dependency creation -->
+  <bean name="DynamicDependencyCreator" class="org.jboss.webbeans.integration.deployer.env.DynamicDependencyCreator">
+    <constructor>
+      <parameter><inject bean="jboss.kernel:service=KernelController"/></parameter>
+    </constructor>
+  </bean>
+
+  <!-- Responsible for booting Web Beans -->
+  <bean name="WebBeansBootstrapDeployer" class="org.jboss.webbeans.integration.deployer.env.WebBeansBootstrapDeployer"/>
+
+  <!-- Missing real URL integration tests-->
+
+  <bean name="MockUrlIntegrationDeployer" class="org.jboss.test.deployers.support.deployer.MockUrlIntegrationDeployer"/>
+
+  <!-- Responsible for inserting the Web Beans RI EJB interceptor -->
+  <bean name="PostEjbJarMetadataDeployer" class="org.jboss.webbeans.integration.deployer.metadata.WBEjbInterceptorMetadataDeployer"/>
+
+  <!-- Responsible for enabling classloader isolation for Web Bean jars -->
+  <bean name="PostJBossMetadataDeployer" class="org.jboss.webbeans.integration.deployer.metadata.PostJBossMetadataDeployer"/>
+
+  <!-- Responsible for enabling classloader isolation for Web Bean wars -->
+  <bean name="PostJBossWebMetadataDeployer" class="org.jboss.webbeans.integration.deployer.metadata.PostJBossWebMetadataDeployer"/>
+
+  <!-- Responsible for adding the Web Beans RI listener to the Servlet -->
+  <bean name="PostWebMetadataDeployer" class="org.jboss.webbeans.integration.deployer.metadata.PostWebMetadataDeployer"/>
+
+  <!-- Removed WebBeansJndiBinder -->
+
+</deployment>


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/resources/org/jboss/test/deployers/test/SmokeTestCase.xml
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/application.properties
===================================================================
--- projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/application.properties	                        (rev 0)
+++ projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/application.properties	2009-07-31 12:34:08 UTC (rev 91873)
@@ -0,0 +1,2 @@
+jar-moduel=simple.jar
+web-module=simple.war


Property changes on: projects/webbeans-ri-int/trunk/deployer/src/test/resources/webbeans/jarwarinear/META-INF/application.properties
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the jboss-cvs-commits mailing list