[jboss-cvs] JBossAS SVN: r102553 - in projects/reloaded/tags: jboss-reloaded-naming-deployers-0.1.0 and 5 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Mar 18 04:22:18 EDT 2010


Author: wolfc
Date: 2010-03-18 04:22:16 -0400 (Thu, 18 Mar 2010)
New Revision: 102553

Added:
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/ExceptionDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/simple/ExceptionTestCase.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml
Removed:
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml
   projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml
Log:
[maven-release-plugin]  copy for tag jboss-reloaded-naming-deployers-0.1.0

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0 (from rev 102216, projects/reloaded/trunk/naming-deployers)

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml
===================================================================
--- projects/reloaded/trunk/naming-deployers/pom.xml	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,47 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-   <parent>
-      <artifactId>jboss-reloaded-build</artifactId>
-      <groupId>org.jboss.reloaded</groupId>
-      <version>0.1.0-alpha-1</version>
-      <relativePath>../build/pom.xml</relativePath>
-   </parent>
-   <modelVersion>4.0.0</modelVersion>
-
-   <artifactId>jboss-reloaded-naming-deployers</artifactId>
-   <version>0.1.0-SNAPSHOT</version>
-   <packaging>jar</packaging>
-   <name>JBoss Reloaded Naming Deployers</name>
-   <description>
-      The integration point between Naming and VDF.
-   </description>
-
-   <dependencies>
-      <dependency>
-         <groupId>org.jboss.deployers</groupId>
-         <artifactId>jboss-deployers-vfs</artifactId>
-         <version>2.0.9.GA</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.deployers</groupId>
-         <artifactId>jboss-deployers-spi</artifactId>
-         <version>2.0.9.GA</version>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.metadata</groupId>
-         <artifactId>jboss-metadata-ear</artifactId>
-         <version>2.0.0.Alpha</version>
-         <scope>test</scope>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.microcontainer</groupId>
-         <artifactId>jboss-kernel</artifactId>
-         <version>2.0.9.GA</version>
-      </dependency>
-      <dependency>
-         <groupId>org.jboss.reloaded</groupId>
-         <artifactId>jboss-reloaded-naming</artifactId>
-         <version>0.1.0-SNAPSHOT</version>
-      </dependency>
-   </dependencies>
-</project>
\ No newline at end of file

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml (from rev 102552, projects/reloaded/trunk/naming-deployers/pom.xml)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/pom.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,57 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+   <parent>
+      <artifactId>jboss-reloaded-build</artifactId>
+      <groupId>org.jboss.reloaded</groupId>
+      <version>0.1.0-alpha-1</version>
+      <relativePath>../build/pom.xml</relativePath>
+   </parent>
+   <modelVersion>4.0.0</modelVersion>
+
+   <artifactId>jboss-reloaded-naming-deployers</artifactId>
+   <version>0.1.0</version>
+   <packaging>jar</packaging>
+   <name>JBoss Reloaded Naming Deployers</name>
+   <description>
+      The integration point between Naming and VDF.
+   </description>
+
+   <properties>
+      <version.org.jboss.deployers>2.2.0.Alpha1</version.org.jboss.deployers>   
+   </properties>
+
+   <dependencies>
+      <dependency>
+         <groupId>org.jboss.deployers</groupId>
+         <artifactId>jboss-deployers-vfs</artifactId>
+         <version>${version.org.jboss.deployers}</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.deployers</groupId>
+         <artifactId>jboss-deployers-spi</artifactId>
+         <version>${version.org.jboss.deployers}</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.metadata</groupId>
+         <artifactId>jboss-metadata-ear</artifactId>
+         <version>2.0.0.Alpha</version>
+         <scope>test</scope>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.kernel</groupId>
+         <artifactId>jboss-kernel</artifactId>
+         <version>2.2.0.Alpha2</version>
+      </dependency>
+      <dependency>
+         <groupId>org.jboss.reloaded</groupId>
+         <artifactId>jboss-reloaded-naming</artifactId>
+         <version>0.1.0</version>
+      </dependency>
+   </dependencies>
+
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0</developerConnection>
+    <url>http://anonsvn.jboss.org/repos/jbossas/projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0</url>
+  </scm>
+</project>

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2009, 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.reloaded.naming.deployers;
-
-import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
-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.spi.deployer.helpers.AbstractRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.plugins.scope.ApplicationScope;
-import org.jboss.reloaded.naming.deployers.javaee.JavaEEApplicationInformer;
-import org.jboss.reloaded.naming.deployers.mc.MCJavaEEApplication;
-
-import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
-
-/**
- * The AppNamingDeployer installs a JavaEEApplication MC bean under the name of java:app
- * within an application scope with the JavaEE application name.
- *
- * The JavaEEApplication MC bean will take care of initiating the java:app name space.
- *
- * To work properly it needs a JavaEEApplicationInformer.
- * 
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class AppNamingDeployer extends AbstractRealDeployer
-{
-   private JavaEEApplicationInformer informer;
-
-   public AppNamingDeployer(JavaEEApplicationInformer informer)
-   {
-      if(informer == null)
-         throw new NullPointerException("informer is null");
-      this.informer = informer;
-      setInputs(informer.getRequiredAttachments());
-      setOutputs("java:app");
-      setOutput(BeanMetaData.class);
-   }
-
-   @Override
-   protected void internalDeploy(DeploymentUnit deploymentUnit) throws DeploymentException
-   {
-      if(!isJavaEEApplication(deploymentUnit))
-         return;
-
-      String appName = informer.getApplicationName(deploymentUnit);
-      // because BeanMetaDataDeployer.undeploy needs an unique name
-      String name = "jboss.naming:application=" + appName;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEApplication.class.getName())
-         .addAnnotation(annotation(ApplicationScope.class, appName))
-         .addConstructorParameter(String.class.getName(), appName)
-         .addAlias("java:app");
-      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));
-      deploymentUnit.addAttachment(BeanMetaData.class + "." + name, builder.getBeanMetaData());
-   }
-
-   protected boolean isJavaEEApplication(DeploymentUnit deploymentUnit)
-   {
-      return informer.isJavaEEApplication(deploymentUnit);
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/AppNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2009, 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.reloaded.naming.deployers;
+
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+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.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.reloaded.naming.deployers.javaee.JavaEEApplicationInformer;
+import org.jboss.reloaded.naming.deployers.mc.MCJavaEEApplication;
+
+/**
+ * The AppNamingDeployer installs a JavaEEApplication MC bean under the name of java:app
+ * within an application scope with the JavaEE application name.
+ *
+ * The JavaEEApplication MC bean will take care of initiating the java:app name space.
+ *
+ * To work properly it needs a JavaEEApplicationInformer.
+ * 
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class AppNamingDeployer extends AbstractRealDeployer
+{
+   private JavaEEApplicationInformer informer;
+
+   public AppNamingDeployer(JavaEEApplicationInformer informer)
+   {
+      if(informer == null)
+         throw new NullPointerException("informer is null");
+      this.informer = informer;
+      setInputs(informer.getRequiredAttachments());
+//      setOutputs("java:app");
+      setOutput(BeanMetaData.class);
+   }
+
+   @Override
+   protected void internalDeploy(DeploymentUnit deploymentUnit) throws DeploymentException
+   {
+      if(!isJavaEEApplication(deploymentUnit))
+         return;
+
+      String appName = informer.getApplicationName(deploymentUnit);
+      // because BeanMetaDataDeployer.undeploy needs an unique name
+      String name = "jboss.naming:application=" + appName;
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEApplication.class.getName())
+         //.addAnnotation(annotation(ApplicationScope.class, appName))
+         .addConstructorParameter(String.class.getName(), appName)
+         //.addAlias("java:app")
+         ;
+      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));
+      deploymentUnit.addAttachment(BeanMetaData.class + "." + name, builder.getBeanMetaData());
+   }
+
+   protected boolean isJavaEEApplication(DeploymentUnit deploymentUnit)
+   {
+      return informer.isJavaEEApplication(deploymentUnit);
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,102 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2010, 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.reloaded.naming.deployers;
-
-import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
-import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
-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.spi.deployer.helpers.AbstractRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.plugins.scope.ApplicationScope;
-import org.jboss.metadata.plugins.scope.DeploymentScope;
-import org.jboss.metadata.plugins.scope.InstanceScope;
-import org.jboss.reloaded.naming.deployers.dependency.ParentsLookupStrategy;
-import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
-import org.jboss.reloaded.naming.deployers.mc.MCJavaEEComponent;
-import org.jboss.reloaded.naming.spi.JavaEEModule;
-
-import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class ComponentNamingDeployer extends AbstractRealDeployer
-{
-   private JavaEEComponentInformer informer;
-
-   public ComponentNamingDeployer(JavaEEComponentInformer informer)
-   {
-      this.informer = informer;
-      setInputs(informer.getRequiredAttachments());
-      addInput("java:module");
-      setOutput(BeanMetaData.class);
-      // if we don't work on components only you'll see a duplicate install of java:module
-      // because AbstractDeploymentUnit.getAttachments inherits attachments from the parent.
-      setComponentsOnly(true);
-   }
-
-   @Override
-   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
-   {
-      if(!informer.isJavaEEComponent(unit))
-         return;
-
-      String appName = informer.getApplicationName(unit);
-      String moduleName = informer.getModulePath(unit);
-      String componentName = informer.getComponentName(unit);
-
-      // create JavaEEModule bean
-      String name = "jboss.naming:";
-      if(appName != null)
-         name += "application=" + appName + ",";
-      name += "module=" + moduleName + ",component=" + componentName;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEComponent.class.getName())
-         .addAnnotation(annotation(DeploymentScope.class, moduleName))
-         .addAnnotation(annotation(InstanceScope.class, componentName))
-         .addConstructorParameter(String.class.getName(), componentName)
-         .addAlias("java:comp");
-      if(appName != null)
-         builder.addAnnotation(annotation(ApplicationScope.class, appName));
-      AbstractInjectionValueMetaData javaModule = new AbstractInjectionValueMetaData("java:module");
-      javaModule.setSearch(new ParentsLookupStrategy());
-      builder.addConstructorParameter(JavaEEModule.class.getName(), javaModule);
-      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));      
-
-      // VDF can't do component composition, so each BMD must be in a separate component
-      //DeploymentUnit component = unit.getParent().addComponent(componentName + ".java:comp");
-      //component.addAttachment(BeanMetaData.class, builder.getBeanMetaData());
-      // putting this into a separate component will make uninstall throw a fit, so lets put it in the parent with an unique name
-      unit.getParent().addAttachment(BeanMetaData.class.getName() + "." + name, builder.getBeanMetaData());
-   }
-
-   @Override
-   protected void internalUndeploy(DeploymentUnit unit)
-   {
-      if(!informer.isJavaEEComponent(unit))
-         return;
-      
-      String name = informer.getComponentName(unit);
-      unit.removeComponent(name + ".java:comp");
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ComponentNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers;
+
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+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.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
+import org.jboss.reloaded.naming.deployers.mc.MCJavaEEComponent;
+import org.jboss.reloaded.naming.spi.JavaEEModule;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class ComponentNamingDeployer extends AbstractRealDeployer
+{
+   private JavaEEComponentInformer informer;
+
+   public ComponentNamingDeployer(JavaEEComponentInformer informer)
+   {
+      this.informer = informer;
+      setInputs(informer.getRequiredAttachments());
+//      addInput("java:module");
+      setOutput(BeanMetaData.class);
+      // if we don't work on components only you'll see a duplicate install of java:module
+      // because AbstractDeploymentUnit.getAttachments inherits attachments from the parent.
+      setComponentsOnly(true);
+   }
+
+   @Override
+   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+   {
+      if(!informer.isJavaEEComponent(unit))
+         return;
+
+      String appName = informer.getApplicationName(unit);
+      String moduleName = informer.getModulePath(unit);
+      String componentName = informer.getComponentName(unit);
+
+      // create JavaEEModule bean
+      String name = "jboss.naming:";
+      if(appName != null)
+         name += "application=" + appName + ",";
+      name += "module=" + moduleName + ",component=" + componentName;
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEComponent.class.getName())
+//         .addAnnotation(annotation(DeploymentScope.class, moduleName))
+//         .addAnnotation(annotation(InstanceScope.class, componentName))
+         .addConstructorParameter(String.class.getName(), componentName)
+//         .addAlias("java:comp")
+         ;
+//      if(appName != null)
+//         builder.addAnnotation(annotation(ApplicationScope.class, appName));
+//      AbstractInjectionValueMetaData javaModule = new AbstractInjectionValueMetaData("java:module");
+//      javaModule.setSearch(new ParentsLookupStrategy());
+      AbstractInjectionValueMetaData javaModule = new AbstractInjectionValueMetaData("jboss.naming:" + (appName != null ? "application=" + appName + "," : "") + "module=" + moduleName);
+      builder.addConstructorParameter(JavaEEModule.class.getName(), javaModule);
+      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));      
+
+      // VDF can't do component composition, so each BMD must be in a separate component
+      //DeploymentUnit component = unit.getParent().addComponent(componentName + ".java:comp");
+      //component.addAttachment(BeanMetaData.class, builder.getBeanMetaData());
+      // putting this into a separate component will make uninstall throw a fit, so lets put it in the parent with an unique name
+      unit.getParent().addAttachment(BeanMetaData.class.getName() + "." + name, builder.getBeanMetaData());
+   }
+
+   @Override
+   protected void internalUndeploy(DeploymentUnit unit)
+   {
+      if(!informer.isJavaEEComponent(unit))
+         return;
+      
+      String name = informer.getComponentName(unit);
+      unit.removeComponent(name + ".java:comp");
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2009, 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.reloaded.naming.deployers;
-
-import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
-import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
-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.spi.deployer.helpers.AbstractRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.plugins.scope.ApplicationScope;
-import org.jboss.metadata.plugins.scope.DeploymentScope;
-import org.jboss.reloaded.naming.deployers.dependency.ParentsLookupStrategy;
-import org.jboss.reloaded.naming.deployers.javaee.JavaEEModuleInformer;
-import org.jboss.reloaded.naming.deployers.mc.MCJavaEEModule;
-import org.jboss.reloaded.naming.spi.JavaEEApplication;
-
-import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
-
-/**
- * The ModuleNamingDeployer installs a JavaEEModule MC bean under the name of java:module
- * within an application scope with the JavaEE application name and an deployment scope
- * with the JavaEE module name.
- *
- * The JavaEEApplication MC bean will take care of initiating the java:app name space.
- *
- * To work properly it needs a JavaEEApplicationInformer.
- *
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class ModuleNamingDeployer extends AbstractRealDeployer
-{
-   private JavaEEModuleInformer informer;
-
-   public ModuleNamingDeployer(JavaEEModuleInformer informer)
-   {
-      this.informer = informer;
-      setInputs(informer.getRequiredAttachments());
-      addInput("java:app");
-      setOutput(BeanMetaData.class);
-   }
-
-   @Override
-   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
-   {
-      if(!isJavaEEModule(unit))
-         return;
-      
-      // appName is either the name of the JavaEE application or null for a stand-alone JavaEE module
-      String appName = informer.getApplicationName(unit);
-      String moduleName = informer.getModulePath(unit);
-
-      // create JavaEEModule bean
-      String name = "jboss.naming:";
-      if(appName != null)
-         name += "application=" + appName + ",";
-      name += "module=" + moduleName;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEModule.class.getName())
-         .addAnnotation(annotation(DeploymentScope.class, moduleName))
-         .addConstructorParameter(String.class.getName(), moduleName)
-         .addAlias("java:module");
-      if(appName != null)
-      {
-         builder.addAnnotation(annotation(ApplicationScope.class, appName));
-         AbstractInjectionValueMetaData javaApp = new AbstractInjectionValueMetaData("java:app");
-         javaApp.setSearch(new ParentsLookupStrategy());
-         builder.addConstructorParameter(JavaEEApplication.class.getName(), javaApp);
-      }
-      else
-         builder.addConstructorParameter(JavaEEApplication.class.getName(), (Object) null);
-      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));
-
-      unit.addAttachment(BeanMetaData.class + "." + name, builder.getBeanMetaData());
-   }
-
-   /**
-    * Determine whether the given deployment unit is a JavaEE module which needs
-    * a java:module name space.
-    * @param unit
-    * @return
-    */
-   protected boolean isJavaEEModule(DeploymentUnit unit)
-   {
-      // TODO: isn't this using too much inside information? It would be better to have the deployer execute explicitly on naming meta data.
-      JavaEEModuleInformer.ModuleType type = informer.getModuleType(unit);
-      return type != null && type != JavaEEModuleInformer.ModuleType.JAVA;
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/ModuleNamingDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,109 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2009, 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.reloaded.naming.deployers;
+
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+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.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.plugins.scope.ApplicationScope;
+import org.jboss.reloaded.naming.deployers.dependency.ParentsLookupStrategy;
+import org.jboss.reloaded.naming.deployers.javaee.JavaEEModuleInformer;
+import org.jboss.reloaded.naming.deployers.mc.MCJavaEEModule;
+import org.jboss.reloaded.naming.spi.JavaEEApplication;
+
+import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
+
+/**
+ * The ModuleNamingDeployer installs a JavaEEModule MC bean under the name of java:module
+ * within an application scope with the JavaEE application name and an deployment scope
+ * with the JavaEE module name.
+ *
+ * The JavaEEApplication MC bean will take care of initiating the java:app name space.
+ *
+ * To work properly it needs a JavaEEApplicationInformer.
+ *
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class ModuleNamingDeployer extends AbstractRealDeployer
+{
+   private JavaEEModuleInformer informer;
+
+   public ModuleNamingDeployer(JavaEEModuleInformer informer)
+   {
+      this.informer = informer;
+      setInputs(informer.getRequiredAttachments());
+//      addInput("java:app");
+      setOutput(BeanMetaData.class);
+   }
+
+   @Override
+   protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+   {
+      if(!isJavaEEModule(unit))
+         return;
+      
+      // appName is either the name of the JavaEE application or null for a stand-alone JavaEE module
+      String appName = informer.getApplicationName(unit);
+      String moduleName = informer.getModulePath(unit);
+
+      // create JavaEEModule bean
+      String name = "jboss.naming:";
+      if(appName != null)
+         name += "application=" + appName + ",";
+      name += "module=" + moduleName;
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, MCJavaEEModule.class.getName())
+//         .addAnnotation(annotation(DeploymentScope.class, moduleName))
+         .addConstructorParameter(String.class.getName(), moduleName)
+//         .addAlias("java:module")
+         ;
+      if(appName != null)
+      {
+//         builder.addAnnotation(annotation(ApplicationScope.class, appName));
+//         AbstractInjectionValueMetaData javaApp = new AbstractInjectionValueMetaData("java:app");
+//         javaApp.setSearch(new ParentsLookupStrategy());
+         AbstractInjectionValueMetaData javaApp = new AbstractInjectionValueMetaData("jboss.naming:application=" + appName);
+         builder.addConstructorParameter(JavaEEApplication.class.getName(), javaApp);
+      }
+      else
+         builder.addConstructorParameter(JavaEEApplication.class.getName(), (Object) null);
+      builder.addPropertyMetaData("nameSpaces", builder.createInject("NameSpaces"));
+
+      unit.addAttachment(BeanMetaData.class + "." + name, builder.getBeanMetaData());
+   }
+
+   /**
+    * Determine whether the given deployment unit is a JavaEE module which needs
+    * a java:module name space.
+    * @param unit
+    * @return
+    */
+   protected boolean isJavaEEModule(DeploymentUnit unit)
+   {
+      // TODO: isn't this using too much inside information? It would be better to have the deployer execute explicitly on naming meta data.
+      JavaEEModuleInformer.ModuleType type = informer.getModuleType(unit);
+      return type != null && type != JavaEEModuleInformer.ModuleType.JAVA;
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
-
-import org.jboss.reloaded.naming.service.NameSpaces;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public abstract class AbstractNameSpace
-{
-   protected String name;
-   protected NameSpaces nameSpaces;
-   protected Context context;
-
-   protected AbstractNameSpace(String name)
-   {
-      this.name = name;
-   }
-   
-   public Context getContext()
-   {
-      return context;
-   }
-
-   public String getName()
-   {
-      return name;
-   }
-
-   public void setNameSpaces(NameSpaces nameSpaces)
-   {
-      this.nameSpaces = nameSpaces;
-   }
-
-   public abstract void start() throws Exception;
-
-   public abstract void stop() throws Exception;
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/AbstractNameSpace.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
+
+import org.jboss.reloaded.naming.service.NameSpaces;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public abstract class AbstractNameSpace
+{
+   protected final String name;
+   protected NameSpaces nameSpaces;
+   protected Context context;
+
+   protected AbstractNameSpace(String name)
+   {
+      this.name = name;
+   }
+   
+   public Context getContext()
+   {
+      return context;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setNameSpaces(NameSpaces nameSpaces)
+   {
+      this.nameSpaces = nameSpaces;
+   }
+
+   public abstract void start() throws Exception;
+
+   public abstract void stop() throws Exception;
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
-
-import org.jboss.logging.Logger;
-import org.jboss.reloaded.naming.spi.JavaEEApplication;
-
-import javax.naming.NamingException;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class MCJavaEEApplication extends AbstractNameSpace implements JavaEEApplication
-{
-   private static final Logger log = Logger.getLogger(MCJavaEEApplication.class);
-   
-   public MCJavaEEApplication(String name)
-   {
-      super(name);
-   }
-
-   @Override
-   public void start() throws NamingException
-   {
-      context = nameSpaces.getGlobalContext().createSubcontext(name);
-      // JavaEE 6 5.15
-      context.bind("AppName", name);
-      log.debug("Installed context " + context + " for JavaEE application " + name);
-   }
-
-   @Override
-   public void stop() throws NamingException
-   {
-      nameSpaces.getGlobalContext().unbind(name);
-      context = null;
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEApplication.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
+
+import org.jboss.logging.Logger;
+import org.jboss.reloaded.naming.spi.JavaEEApplication;
+
+import javax.naming.NamingException;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class MCJavaEEApplication extends AbstractNameSpace implements JavaEEApplication
+{
+   private static final Logger log = Logger.getLogger(MCJavaEEApplication.class);
+   
+   public MCJavaEEApplication(String name)
+   {
+      super(name);
+   }
+
+   @Override
+   public void start() throws NamingException
+   {
+      context = nameSpaces.getGlobalContext().createSubcontext(name);
+      // JavaEE 6 5.15
+      context.bind("AppName", name);
+      log.debug("Installed context " + context + " for JavaEE application " + name);
+   }
+
+   @Override
+   public void stop() throws NamingException
+   {
+      nameSpaces.getGlobalContext().unbind(name);
+      context = null;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "MCJavaEEApplication{" +
+         "name='" + name + '\'' +
+         '}';
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2010, 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.reloaded.naming.deployers.mc;
-
-import org.jboss.logging.Logger;
-import org.jboss.reloaded.naming.spi.JavaEEComponent;
-import org.jboss.reloaded.naming.spi.JavaEEModule;
-import org.jnp.interfaces.NamingContext;
-import org.jnp.server.NamingServer;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class MCJavaEEComponent extends AbstractNameSpace implements JavaEEComponent
-{
-   private static final Logger log = Logger.getLogger(MCJavaEEComponent.class);
-   
-   private JavaEEModule module;
-
-   public MCJavaEEComponent(String name, JavaEEModule module)
-   {
-      super(name);
-      this.module = module;
-   }
-
-   public JavaEEModule getModule()
-   {
-      return module;
-   }
-
-   @Override
-   public void start() throws Exception
-   {
-      NamingServer srv = new NamingServer();
-      context = new NamingContext(nameSpaces.getGlobalContext().getEnvironment(), null, srv);
-
-      log.debug("Installed context " + context + " for JavaEE component " + name + " in module " + module.getName());
-   }
-
-   @Override
-   public void stop() throws Exception
-   {
-      context = null;
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEComponent.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,73 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.mc;
+
+import org.jboss.logging.Logger;
+import org.jboss.reloaded.naming.spi.JavaEEComponent;
+import org.jboss.reloaded.naming.spi.JavaEEModule;
+import org.jnp.interfaces.NamingContext;
+import org.jnp.server.NamingServer;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class MCJavaEEComponent extends AbstractNameSpace implements JavaEEComponent
+{
+   private static final Logger log = Logger.getLogger(MCJavaEEComponent.class);
+   
+   private JavaEEModule module;
+
+   public MCJavaEEComponent(String name, JavaEEModule module)
+   {
+      super(name);
+      this.module = module;
+   }
+
+   public JavaEEModule getModule()
+   {
+      return module;
+   }
+
+   @Override
+   public void start() throws Exception
+   {
+      NamingServer srv = new NamingServer();
+      context = new NamingContext(nameSpaces.getGlobalContext().getEnvironment(), null, srv);
+
+      log.debug("Installed context " + context + " for JavaEE component " + name + " in module " + module.getName());
+   }
+
+   @Override
+   public void stop() throws Exception
+   {
+      context = null;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "MCJavaEEComponent{" +
+         "module=" + module +
+         ", name='" + name + '\'' +
+         '}';
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
-
-import org.jboss.logging.Logger;
-import org.jboss.util.naming.Util;
-import org.jboss.reloaded.naming.spi.JavaEEApplication;
-import org.jboss.reloaded.naming.spi.JavaEEModule;
-
-import javax.naming.Context;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class MCJavaEEModule extends AbstractNameSpace implements JavaEEModule
-{
-   private static final Logger log = Logger.getLogger(MCJavaEEModule.class);
-   
-   private JavaEEApplication application;
-   private Context parentContext;
-
-   public MCJavaEEModule(String name, JavaEEApplication application)
-   {
-      super(name);
-      this.application = application;
-   }
-
-   public JavaEEApplication getApplication()
-   {
-      return application;
-   }
-
-   @Override
-   public void start() throws Exception
-   {
-      parentContext = (application != null ? application.getContext() : nameSpaces.getGlobalContext());
-      context = Util.createSubcontext(parentContext, name);
-      // JavaEE 6 5.15
-      context.bind("ModuleName", name);
-      log.debug("Installed context " + context + " for JavaEE module " + name + ", application = " + application + ", parentContext = " + parentContext);
-   }
-
-   @Override
-   public void stop() throws Exception
-   {
-      Util.unbind(parentContext, name);
-      context = null;
-      parentContext = null;
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/main/java/org/jboss/reloaded/naming/deployers/mc/MCJavaEEModule.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2009, 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.reloaded.naming.deployers.mc;
+
+import org.jboss.logging.Logger;
+import org.jboss.util.naming.Util;
+import org.jboss.reloaded.naming.spi.JavaEEApplication;
+import org.jboss.reloaded.naming.spi.JavaEEModule;
+
+import javax.naming.Context;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class MCJavaEEModule extends AbstractNameSpace implements JavaEEModule
+{
+   private static final Logger log = Logger.getLogger(MCJavaEEModule.class);
+   
+   private JavaEEApplication application;
+   private Context parentContext;
+
+   public MCJavaEEModule(String name, JavaEEApplication application)
+   {
+      super(name);
+      this.application = application;
+   }
+
+   public JavaEEApplication getApplication()
+   {
+      return application;
+   }
+
+   @Override
+   public void start() throws Exception
+   {
+      parentContext = (application != null ? application.getContext() : nameSpaces.getGlobalContext());
+      context = Util.createSubcontext(parentContext, name);
+      // JavaEE 6 5.15
+      context.bind("ModuleName", name);
+      log.debug("Installed context " + context + " for JavaEE module " + name + ", application = " + application + ", parentContext = " + parentContext);
+   }
+
+   @Override
+   public void stop() throws Exception
+   {
+      Util.unbind(parentContext, name);
+      context = null;
+      parentContext = null;
+   }
+
+   @Override
+   public String toString()
+   {
+      return "MCJavaEEModule{" +
+         "application=" + application +
+         ", name='" + name + '\'' +
+         '}';
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
-
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerMode;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.client.spi.main.MainDeployer;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.bootstrap.AbstractBootstrap;
-import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
-import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.junit.BeforeClass;
-
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-import java.net.URL;
-
-import static org.junit.Assert.fail;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public abstract class AbstractNamingDeployersTestCase
-{
-   private static Kernel kernel;
-   private static BasicXMLDeployer deployer;
-   protected static MainDeployer mainDeployer;
-   protected static InitialContext ctx;
-
-   protected static final void assertNameNotFound(String name) throws NamingException
-   {
-      try
-      {
-         ctx.lookup(name);
-         fail("Expected NameNotFoundException for " + name);
-      }
-      catch(NameNotFoundException e)
-      {
-         // good
-      }
-   }
-
-   @BeforeClass
-   public static void beforeClass() throws Exception
-   {
-      AbstractBootstrap bootstrap = new BasicBootstrap();
-      bootstrap.run();
-      kernel = bootstrap.getKernel();
-      deployer = new BasicXMLDeployer(kernel, ControllerMode.AUTOMATIC);
-
-      ClassLoader cl = AbstractNamingDeployersTestCase.class.getClassLoader();
-      deploy(cl, "classloader.xml");
-      deploy(cl, "deployers.xml");
-
-      mainDeployer = getBean("MainDeployer", ControllerState.INSTALLED, MainDeployer.class);
-
-      deploy(cl, "jndi-beans.xml");
-      deploy(cl, "reloaded-naming-deployers-beans.xml");
-
-      deploy(cl, "dummy-deployers-beans.xml");
-
-      ctx = new InitialContext();
-   }
-
-   protected static <T> T getBean(String name, ControllerState state, Class<T> expectedType)
-   {
-      ControllerContext context = kernel.getController().getContext(name, state);
-      return expectedType.cast(context.getTarget());
-   }
-   
-   protected static KernelDeployment deploy(URL url) throws Exception
-   {
-      try
-      {
-         return deployer.deploy(url);
-      }
-      catch(Throwable t)
-      {
-         if(t instanceof Error)
-            throw (Error) t;
-         if(t instanceof RuntimeException)
-            throw (RuntimeException) t;
-         throw (Exception) t;
-      }
-   }
-
-   public static KernelDeployment deploy(ClassLoader cl, String resource) throws Exception
-   {
-      URL url = cl.getResource(resource);
-      if(url == null)
-         throw new IllegalArgumentException("Can't find resource '" + resource + "'");
-      try
-      {
-         return deploy(url);
-      }
-      finally
-      {
-         validate();
-      }
-   }
-
-   protected static void validate() throws Exception
-   {
-      try
-      {
-         deployer.validate();
-      }
-      catch(Throwable t)
-      {
-         if(t instanceof Error)
-            throw (Error) t;
-         if(t instanceof RuntimeException)
-            throw (RuntimeException) t;
-         throw (Exception) t;
-      }
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/AbstractNamingDeployersTestCase.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerMode;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.plugins.bootstrap.AbstractBootstrap;
+import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
+import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.junit.BeforeClass;
+
+import javax.naming.InitialContext;
+import javax.naming.NameNotFoundException;
+import javax.naming.NamingException;
+import java.net.URL;
+
+import static org.junit.Assert.fail;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public abstract class AbstractNamingDeployersTestCase
+{
+   protected static Kernel kernel;
+   private static BasicXMLDeployer deployer;
+   protected static MainDeployer mainDeployer;
+   protected static InitialContext ctx;
+
+   protected static final void assertNameNotFound(String name) throws NamingException
+   {
+      try
+      {
+         ctx.lookup(name);
+         fail("Expected NameNotFoundException for " + name);
+      }
+      catch(NameNotFoundException e)
+      {
+         // good
+      }
+   }
+
+   @BeforeClass
+   public static void beforeClass() throws Exception
+   {
+      AbstractBootstrap bootstrap = new BasicBootstrap();
+      bootstrap.run();
+      kernel = bootstrap.getKernel();
+      deployer = new BasicXMLDeployer(kernel, ControllerMode.AUTOMATIC);
+
+      ClassLoader cl = AbstractNamingDeployersTestCase.class.getClassLoader();
+      deploy(cl, "classloader.xml");
+      deploy(cl, "deployers.xml");
+
+      mainDeployer = getBean("MainDeployer", ControllerState.INSTALLED, MainDeployer.class);
+
+      deploy(cl, "jndi-beans.xml");
+      deploy(cl, "reloaded-naming-deployers-beans.xml");
+
+      deploy(cl, "dummy-deployers-beans.xml");
+
+      ctx = new InitialContext();
+   }
+
+   protected static <T> T getBean(String name, ControllerState state, Class<T> expectedType)
+   {
+      ControllerContext context = kernel.getController().getContext(name, state);
+      return expectedType.cast(context.getTarget());
+   }
+   
+   protected static KernelDeployment deploy(URL url) throws Exception
+   {
+      try
+      {
+         return deployer.deploy(url);
+      }
+      catch(Throwable t)
+      {
+         if(t instanceof Error)
+            throw (Error) t;
+         if(t instanceof RuntimeException)
+            throw (RuntimeException) t;
+         throw (Exception) t;
+      }
+   }
+
+   public static KernelDeployment deploy(ClassLoader cl, String resource) throws Exception
+   {
+      URL url = cl.getResource(resource);
+      if(url == null)
+         throw new IllegalArgumentException("Can't find resource '" + resource + "'");
+      try
+      {
+         return deploy(url);
+      }
+      finally
+      {
+         validate();
+      }
+   }
+
+   protected static void validate() throws Exception
+   {
+      try
+      {
+         deployer.validate();
+      }
+      catch(Throwable t)
+      {
+         if(t instanceof Error)
+            throw (Error) t;
+         if(t instanceof RuntimeException)
+            throw (RuntimeException) t;
+         throw (Exception) t;
+      }
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
-
-import org.jboss.logging.Logger;
-import org.jboss.reloaded.naming.CurrentComponent;
-import org.jboss.reloaded.naming.spi.JavaEEComponent;
-import org.jboss.util.naming.NonSerializableFactory;
-import org.jboss.util.naming.Util;
-
-import javax.naming.InitialContext;
-import java.util.concurrent.Callable;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class DummyContainer
-{
-   private static Logger log = Logger.getLogger(DummyContainer.class);
-   
-   private JavaEEComponent component;
-   private InitialContext ctx;
-
-   public DummyContainer(JavaEEComponent component)
-   {
-      this.component = component;
-   }
-
-   private <R> R around(Callable<R> callable)
-   {
-      CurrentComponent.push(component);
-      try
-      {
-         return callable.call();
-      }
-      catch(Exception e)
-      {
-         if(e instanceof RuntimeException)
-            throw (RuntimeException) e;
-         throw new RuntimeException(e);
-      }
-      finally
-      {
-         CurrentComponent.pop();
-      }
-   }
-
-   public Object getValue(final String name)
-   {
-      return around(new Callable<Object>() {
-         public Object call() throws Exception
-         {
-            return ctx.lookup(name);
-         }
-      });
-   }
-
-   public void setValue(final String name, final String value)
-   {
-      around(new Callable<Void>() {
-         public Void call() throws Exception
-         {
-            Util.bind(ctx, name, value);
-            return null;
-         }
-      });
-   }
-
-   public void start() throws Exception
-   {
-      ctx = new InitialContext();
-
-      // normally done somewhere else
-      NonSerializableFactory.rebind(component.getModule().getContext(), component.getName(), this);
-      
-      log.info("Started container " + this + " with java:comp context " + component.getContext());
-   }
-
-   public void stop() throws Exception
-   {
-      Util.unbind(component.getModule().getContext(), component.getName());
-
-      if(ctx != null)
-         ctx.close();
-      ctx = null;
-
-      log.info("Stopped container " + this);
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyContainer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,116 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
+
+import org.jboss.logging.Logger;
+import org.jboss.reloaded.naming.CurrentComponent;
+import org.jboss.reloaded.naming.spi.JavaEEComponent;
+import org.jboss.util.naming.NonSerializableFactory;
+import org.jboss.util.naming.Util;
+
+import javax.naming.InitialContext;
+import java.util.concurrent.Callable;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class DummyContainer
+{
+   private static Logger log = Logger.getLogger(DummyContainer.class);
+   
+   private final JavaEEComponent component;
+   private InitialContext ctx;
+
+   public DummyContainer(JavaEEComponent component)
+   {
+      this.component = component;
+   }
+
+   private <R> R around(Callable<R> callable)
+   {
+      CurrentComponent.push(component);
+      try
+      {
+         return callable.call();
+      }
+      catch(Exception e)
+      {
+         if(e instanceof RuntimeException)
+            throw (RuntimeException) e;
+         throw new RuntimeException(e);
+      }
+      finally
+      {
+         CurrentComponent.pop();
+      }
+   }
+
+   public Object getValue(final String name)
+   {
+      return around(new Callable<Object>() {
+         public Object call() throws Exception
+         {
+            return ctx.lookup(name);
+         }
+      });
+   }
+
+   public void setValue(final String name, final String value)
+   {
+      around(new Callable<Void>() {
+         public Void call() throws Exception
+         {
+            Util.bind(ctx, name, value);
+            return null;
+         }
+      });
+   }
+
+   public void start() throws Exception
+   {
+      ctx = new InitialContext();
+
+      // normally done somewhere else
+      NonSerializableFactory.rebind(component.getModule().getContext(), component.getName(), this);
+      
+      log.info("Started container " + this + " with java:comp context " + component.getContext());
+   }
+
+   public void stop() throws Exception
+   {
+      Util.unbind(component.getModule().getContext(), component.getName());
+
+      if(ctx != null)
+         ctx.close();
+      ctx = null;
+
+      log.info("Stopped container " + this);
+   }
+
+   @Override
+   public String toString()
+   {
+      return "DummyContainer{" +
+         "component=" + component +
+         '}';
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
-
-import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
-import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.dependency.plugins.graph.Search;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.metadata.plugins.scope.ApplicationScope;
-import org.jboss.metadata.plugins.scope.DeploymentScope;
-import org.jboss.metadata.plugins.scope.InstanceScope;
-import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
-import org.jboss.reloaded.naming.spi.JavaEEComponent;
-
-import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
-
-/**
- * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
- */
-public class DummyDeployer extends AbstractSimpleRealDeployer<DummyMetaData>
-{
-   private JavaEEComponentInformer informer;
-   
-   public DummyDeployer()
-   {
-      super(DummyMetaData.class);
-      setOutput(BeanMetaData.class);
-      setComponentsOnly(true);
-      //setUseUnitName(true);
-   }
-
-   @Override
-   public void deploy(DeploymentUnit unit, DummyMetaData deployment) throws DeploymentException
-   {
-      String appName = informer.getApplicationName(unit);
-      String moduleName = informer.getModulePath(unit);
-      String componentName = informer.getComponentName(unit);
-
-      // create dummy container bean
-      String name = "jboss.dummy:";
-      if(appName != null)
-         name += "application=" + appName + ",";
-      name += "module=" + moduleName + ",component=" + componentName;
-      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, DummyContainer.class.getName())
-         .addAnnotation(annotation(DeploymentScope.class, moduleName))
-         .addAnnotation(annotation(InstanceScope.class, componentName))
-         .addAlias(componentName);
-      if(appName != null)
-         builder.addAnnotation(annotation(ApplicationScope.class, appName));
-      AbstractInjectionValueMetaData javaComponent = new AbstractInjectionValueMetaData("java:comp");
-      javaComponent.setSearch(Search.LOCAL);
-      builder.addConstructorParameter(JavaEEComponent.class.getName(), javaComponent);
-
-      unit.getParent().addAttachment(BeanMetaData.class.getName() + "." + name, builder.getBeanMetaData());
-      //unit.addAttachment(BeanMetaData.class, builder.getBeanMetaData());
-   }
-
-   public void setJavaEEComponentInformer(JavaEEComponentInformer informer)
-   {
-      this.informer = informer;
-   }
-}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/DummyDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
+
+import org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData;
+import org.jboss.beans.metadata.plugins.builder.BeanMetaDataBuilderFactory;
+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.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.plugins.scope.ApplicationScope;
+import org.jboss.reloaded.naming.deployers.javaee.JavaEEComponentInformer;
+import org.jboss.reloaded.naming.spi.JavaEEComponent;
+
+import static org.jboss.reloaded.naming.deployers.util.AnnotationHelper.annotation;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class DummyDeployer extends AbstractSimpleRealDeployer<DummyMetaData>
+{
+   private JavaEEComponentInformer informer;
+   
+   public DummyDeployer()
+   {
+      super(DummyMetaData.class);
+      setOutput(BeanMetaData.class);
+      setComponentsOnly(true);
+      //setUseUnitName(true);
+   }
+
+   @Override
+   public void deploy(DeploymentUnit unit, DummyMetaData deployment) throws DeploymentException
+   {
+      String appName = informer.getApplicationName(unit);
+      String moduleName = informer.getModulePath(unit);
+      String componentName = informer.getComponentName(unit);
+
+      // create dummy container bean
+      String name = "jboss.dummy:";
+      if(appName != null)
+         name += "application=" + appName + ",";
+      name += "module=" + moduleName + ",component=" + componentName;
+      BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(name, DummyContainer.class.getName())
+//         .addAnnotation(annotation(DeploymentScope.class, moduleName))
+//         .addAnnotation(annotation(InstanceScope.class, componentName))
+//         .addAlias(componentName)
+         ;
+//      if(appName != null)
+//         builder.addAnnotation(annotation(ApplicationScope.class, appName));
+//      AbstractInjectionValueMetaData javaComponent = new AbstractInjectionValueMetaData("java:comp");
+//      javaComponent.setSearch(Search.LOCAL);
+      AbstractInjectionValueMetaData javaComponent = new AbstractInjectionValueMetaData("jboss.naming:" + (appName != null ? "application=" + appName + "," : "") + "module=" + moduleName + ",component=" + componentName);
+      builder.addConstructorParameter(JavaEEComponent.class.getName(), javaComponent);
+
+      unit.getParent().addAttachment(BeanMetaData.class.getName() + "." + name, builder.getBeanMetaData());
+      //unit.addAttachment(BeanMetaData.class, builder.getBeanMetaData());
+   }
+
+   public void setJavaEEComponentInformer(JavaEEComponentInformer informer)
+   {
+      this.informer = informer;
+   }
+}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/ExceptionDeployer.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/common/ExceptionDeployer.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/ExceptionDeployer.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/common/ExceptionDeployer.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.test.common;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class ExceptionDeployer extends AbstractSimpleRealDeployer<Exception>
+{
+   public ExceptionDeployer()
+   {
+      super(Exception.class);
+   }
+
+   @Override
+   public void deploy(DeploymentUnit unit, Exception deployment) throws DeploymentException
+   {
+      throw new DeploymentException(deployment);
+   }
+
+   @Override
+   public void undeploy(DeploymentUnit unit, Exception deployment)
+   {
+      log.info("undeploy " + unit);
+   }
+}

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/simple/ExceptionTestCase.java (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/java/org/jboss/reloaded/naming/deployers/test/simple/ExceptionTestCase.java)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/simple/ExceptionTestCase.java	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/java/org/jboss/reloaded/naming/deployers/test/simple/ExceptionTestCase.java	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright (c) 2010, 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.reloaded.naming.deployers.test.simple;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.attachments.MutableAttachments;
+import org.jboss.deployers.vfs.plugins.client.AbstractVFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.reloaded.naming.deployers.test.common.AbstractNamingDeployersTestCase;
+import org.jboss.reloaded.naming.deployers.test.common.DummiesMetaData;
+import org.jboss.virtual.AssembledDirectory;
+import org.junit.Test;
+
+import static org.junit.Assert.fail;
+
+/**
+ * @author <a href="cdewolf at redhat.com">Carlo de Wolf</a>
+ */
+public class ExceptionTestCase extends AbstractNamingDeployersTestCase
+{
+   @Test
+   public void test1() throws Exception
+   {
+      AssembledDirectory root = AssembledDirectory.createAssembledDirectory("components", "components.jar");
+      VFSDeployment deployment = new AbstractVFSDeployment(root);
+      ((MutableAttachments) deployment.getPredeterminedManagedObjects()).addAttachment(DummiesMetaData.class, DummiesMetaData.create("A", "B"));
+      ((MutableAttachments) deployment.getPredeterminedManagedObjects()).addAttachment(Exception.class, new Exception("fail"));
+      try
+      {
+         mainDeployer.deploy(deployment);
+         fail("Expected DeploymentException");
+      }
+      catch(DeploymentException e)
+      {
+         // good
+      }
+
+      AssembledDirectory root2 = AssembledDirectory.createAssembledDirectory("components2", "components2.jar");
+      VFSDeployment deployment2 = new AbstractVFSDeployment(root2);
+      ((MutableAttachments) deployment2.getPredeterminedManagedObjects()).addAttachment(DummiesMetaData.class, DummiesMetaData.create("A", "B"));
+      mainDeployer.deploy(deployment2);
+      
+      mainDeployer.undeploy(deployment2);
+   }
+}

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/test/resources/dummy-deployers-beans.xml	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-   <bean name="DummiesSerializedMetaDataDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummiesSerializedMetaDataDeployer"/>
-   <bean name="DummiesDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummiesDeployer"/>
-   <bean name="DummyDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummyDeployer">
-      <property name="javaEEComponentInformer"><inject bean="JavaEEComponentInformer"/></property>      
-   </bean>
-</deployment>
\ No newline at end of file

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/resources/dummy-deployers-beans.xml)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/dummy-deployers-beans.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="DummiesSerializedMetaDataDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummiesSerializedMetaDataDeployer"/>
+   <bean name="DummiesDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummiesDeployer"/>
+   <bean name="DummyDeployer" class="org.jboss.reloaded.naming.deployers.test.common.DummyDeployer">
+      <property name="javaEEComponentInformer"><inject bean="JavaEEComponentInformer"/></property>      
+   </bean>
+
+   <bean name="ExceptionDeployer" class="org.jboss.reloaded.naming.deployers.test.common.ExceptionDeployer"/>
+</deployment>
\ No newline at end of file

Deleted: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml
===================================================================
--- projects/reloaded/trunk/naming-deployers/src/test/resources/log4j.xml	2010-03-10 07:14:35 UTC (rev 102216)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -1,149 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ JBoss, Home of Professional Open Source.
-  ~ Copyright (c) 2009, 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.
-  -->
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<!-- ===================================================================== -->
-<!--                                                                       -->
-<!--  Log4j Configuration                                                  -->
-<!--                                                                       -->
-<!-- ===================================================================== -->
-
-<!-- $Id$ -->
-
-<!--
-   | For more configuration infromation and examples see the Jakarta Log4j
-   | owebsite: http://jakarta.apache.org/log4j
- -->
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
-
-  <!-- ================================= -->
-  <!-- Preserve messages in a local file -->
-  <!-- ================================= -->
-
-  <!-- A time/date based rolling appender -->
-  <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
-    <param name="File" value="target/test.log"/>
-    <param name="Append" value="false"/>
-
-    <!-- Rollover at midnight each day -->
-    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
-
-    <!-- Rollover at the top of each hour
-    <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
-    -->
-
-    <layout class="org.apache.log4j.PatternLayout">
-      <!-- The default pattern: Date Priority [Category] Message\n -->
-      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-
-      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
-      <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
-       -->
-    </layout>
-  </appender>
-
-  <!-- A size based file rolling appender
-  <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
-    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
-    <param name="Append" value="false"/>
-    <param name="MaxFileSize" value="500KB"/>
-    <param name="MaxBackupIndex" value="1"/>
-
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
-    </layout>
-  </appender>
-  -->
-
-  <!-- ============================== -->
-  <!-- Append messages to the console -->
-  <!-- ============================== -->
-
-  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
-    <param name="Target" value="System.out"/>
-    <!-- param name="Threshold" value="DEBUG"/ -->
-
-    <layout class="org.apache.log4j.PatternLayout">
-      <!-- The default pattern: Date Priority [Category] Message\n -->
-      <!-- param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/ -->
-      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n"/>
-    </layout>
-  </appender>
-
-
-  <!-- ================ -->
-  <!-- Limit categories -->
-  <!-- ================ -->
-
-  <!-- Limit JBoss categories to INFO
-  <category name="org.jboss">
-    <priority value="INFO" class="org.jboss.logging.XLevel"/>
-  </category>
-  -->
-
-  <!-- Increase the priority threshold for the DefaultDS category
-  <category name="DefaultDS">
-    <priority value="FATAL"/>
-  </category>
-  -->
-
-  <!-- Decrease the priority threshold for the org.jboss.varia category
-  <category name="org.jboss.varia">
-    <priority value="DEBUG"/>
-  </category>
-  -->
-
-  <!--
-     | An example of enabling the custom TRACE level priority that is used
-     | by the JBoss internals to diagnose low level details. This example
-     | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
-     | subpackages. This will produce A LOT of logging output.
-  <category name="org.jboss.system">
-    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
-  </category>
-  -->
-
-  <category name="org.jboss">
-    <priority value="INFO"/>
-  </category>
-
-  <category name="org.jboss.reloaded.naming.deployers">
-    <priority value="DEBUG"/>
-  </category>
-
-   <category name="org.jnp">
-     <priority value="INFO"/>
-   </category>
-
-  <!-- ======================= -->
-  <!-- Setup the Root category -->
-  <!-- ======================= -->
-
-  <root>
-    <priority value="ALL" />
-    <appender-ref ref="CONSOLE"/>
-    <appender-ref ref="FILE"/>
-  </root>
-
-</log4j:configuration>

Copied: projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml (from rev 102525, projects/reloaded/trunk/naming-deployers/src/test/resources/log4j.xml)
===================================================================
--- projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml	                        (rev 0)
+++ projects/reloaded/tags/jboss-reloaded-naming-deployers-0.1.0/src/test/resources/log4j.xml	2010-03-18 08:22:16 UTC (rev 102553)
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ JBoss, Home of Professional Open Source.
+  ~ Copyright (c) 2009, 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.
+  -->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id$ -->
+
+<!--
+   | For more configuration infromation and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+  <!-- ================================= -->
+  <!-- Preserve messages in a local file -->
+  <!-- ================================= -->
+
+  <!-- A time/date based rolling appender -->
+  <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+    <param name="File" value="target/test.log"/>
+    <param name="Append" value="false"/>
+
+    <!-- Rollover at midnight each day -->
+    <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+    <!-- Rollover at the top of each hour
+    <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/>
+    -->
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+
+      <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n
+      <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/>
+       -->
+    </layout>
+  </appender>
+
+  <!-- A size based file rolling appender
+  <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+    <param name="File" value="${jboss.server.home.dir}/log/server.log"/>
+    <param name="Append" value="false"/>
+    <param name="MaxFileSize" value="500KB"/>
+    <param name="MaxBackupIndex" value="1"/>
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+    </layout>
+  </appender>
+  -->
+
+  <!-- ============================== -->
+  <!-- Append messages to the console -->
+  <!-- ============================== -->
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out"/>
+    <!-- param name="Threshold" value="DEBUG"/ -->
+
+    <layout class="org.apache.log4j.PatternLayout">
+      <!-- The default pattern: Date Priority [Category] Message\n -->
+      <!-- param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/ -->
+      <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n"/>
+    </layout>
+  </appender>
+
+
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+
+  <!-- Limit JBoss categories to INFO
+  <category name="org.jboss">
+    <priority value="INFO" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <!-- Increase the priority threshold for the DefaultDS category
+  <category name="DefaultDS">
+    <priority value="FATAL"/>
+  </category>
+  -->
+
+  <!-- Decrease the priority threshold for the org.jboss.varia category
+  <category name="org.jboss.varia">
+    <priority value="DEBUG"/>
+  </category>
+  -->
+
+  <!--
+     | An example of enabling the custom TRACE level priority that is used
+     | by the JBoss internals to diagnose low level details. This example
+     | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its
+     | subpackages. This will produce A LOT of logging output.
+  <category name="org.jboss.system">
+    <priority value="TRACE" class="org.jboss.logging.XLevel"/>
+  </category>
+  -->
+
+  <category name="org.jboss">
+    <priority value="INFO"/>
+  </category>
+
+  <!--
+  <category name="org.jboss.dependency">
+    <priority value="ALL"/>
+  </category>
+
+  <category name="org.jboss.kernel">
+    <priority value="ALL"/>
+  </category>
+  -->
+
+  <category name="org.jboss.reloaded.naming.deployers">
+    <priority value="DEBUG"/>
+  </category>
+
+   <category name="org.jnp">
+     <priority value="INFO"/>
+   </category>
+
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <priority value="ALL" />
+    <appender-ref ref="CONSOLE"/>
+    <appender-ref ref="FILE"/>
+  </root>
+
+</log4j:configuration>




More information about the jboss-cvs-commits mailing list