[jboss-svn-commits] JBoss Common SVN: r4526 - in arquillian/trunk/containers/jbossas-local-51: src/main/java/org/jboss/arquillian and 7 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Jun 15 08:22:19 EDT 2010


Author: aslak
Date: 2010-06-15 08:22:18 -0400 (Tue, 15 Jun 2010)
New Revision: 4526

Added:
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java
Removed:
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/
   arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java
   arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java
Modified:
   arquillian/trunk/containers/jbossas-local-51/pom.xml
   arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
   arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration
   arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer
   arquillian/trunk/containers/jbossas-local-51/src/test/resources/arquillian.xml
Log:
ARQ-179 Restored old version


Modified: arquillian/trunk/containers/jbossas-local-51/pom.xml
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/pom.xml	2010-06-15 12:20:50 UTC (rev 4525)
+++ arquillian/trunk/containers/jbossas-local-51/pom.xml	2010-06-15 12:22:18 UTC (rev 4526)
@@ -77,7 +77,7 @@
             <artifactId>jboss-as-client</artifactId>
             <version>5.1.0.GA</version>
             <type>pom</type>
-            <scope>provided</scope>
+            <scope>provided</scope>            
         </dependency>
 
 	<!-- Testing -->

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss)

Deleted: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,101 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss;
-
-import java.io.File;
-
-import org.jboss.arquillian.spi.ContainerConfiguration;
-import org.jboss.arquillian.spi.ContainerProfile;
-
-/**
- * A {@link org.jboss.arquillian.spi.ContainerConfiguration} implementation for
- * the JBoss AS container.
- *
- * @author <a href="mailto:german.escobarc at gmail.com">German Escobar</a>
- * @version $Revision: $
- */
-public class JBossASConfiguration implements ContainerConfiguration
-{
-   private String bindAddress = "localhost";
-
-   private int httpPort = 8080;
-
-   private String profileName = "default";
-   
-   private String jbossHome = null;
-   
-   private String javaHome = null;
-
-   public ContainerProfile getContainerProfile()
-   {
-      return ContainerProfile.CLIENT;
-   }
-   
-   public String getBindAddress()
-   {
-      return bindAddress;
-   }
-
-   public void setBindAddress(String bindAddress)
-   {
-      this.bindAddress = bindAddress;
-   }
-
-   public int getHttpPort()
-   {
-      return httpPort;
-   }
-
-   public void setHttpPort(int httpPort)
-   {
-      this.httpPort = httpPort;
-   }
-
-   public String getProfileName()
-   {
-      return profileName;
-   }
-
-   public void setProfileName(String profileName)
-   {
-      this.profileName = profileName;
-   }
-
-   public void setJbossHome(String jbossHome)
-   {
-      this.jbossHome = jbossHome;
-   }
-   
-   public String getJbossHome()
-   {
-      if(jbossHome != null) 
-      {
-         return new File(jbossHome).getAbsolutePath();
-      }
-      return jbossHome;
-   }
-   
-   public void setJavaHome(String javaHome)
-   {
-      this.javaHome = javaHome;
-   }
-   
-   public String getJavaHome()
-   {
-      return javaHome;
-   }
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASConfiguration.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,101 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss;
+
+import java.io.File;
+
+import org.jboss.arquillian.spi.ContainerConfiguration;
+import org.jboss.arquillian.spi.ContainerProfile;
+
+/**
+ * A {@link org.jboss.arquillian.spi.ContainerConfiguration} implementation for
+ * the JBoss AS container.
+ *
+ * @author <a href="mailto:german.escobarc at gmail.com">German Escobar</a>
+ * @version $Revision: $
+ */
+public class JBossASConfiguration implements ContainerConfiguration
+{
+   private String bindAddress = "localhost";
+
+   private int httpPort = 8080;
+
+   private String profileName = "default";
+   
+   private String jbossHome = null;
+   
+   private String javaHome = null;
+
+   public ContainerProfile getContainerProfile()
+   {
+      return ContainerProfile.CLIENT;
+   }
+   
+   public String getBindAddress()
+   {
+      return bindAddress;
+   }
+
+   public void setBindAddress(String bindAddress)
+   {
+      this.bindAddress = bindAddress;
+   }
+
+   public int getHttpPort()
+   {
+      return httpPort;
+   }
+
+   public void setHttpPort(int httpPort)
+   {
+      this.httpPort = httpPort;
+   }
+
+   public String getProfileName()
+   {
+      return profileName;
+   }
+
+   public void setProfileName(String profileName)
+   {
+      this.profileName = profileName;
+   }
+
+   public void setJbossHome(String jbossHome)
+   {
+      this.jbossHome = jbossHome;
+   }
+   
+   public String getJbossHome()
+   {
+      if(jbossHome != null) 
+      {
+         return new File(jbossHome).getAbsolutePath();
+      }
+      return jbossHome;
+   }
+   
+   public void setJavaHome(String javaHome)
+   {
+      this.javaHome = javaHome;
+   }
+   
+   public String getJavaHome()
+   {
+      return javaHome;
+   }
+}

Deleted: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss;
-
-import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
-import org.jboss.arquillian.spi.TestEnricher;
-import org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher;
-import org.jboss.arquillian.testenricher.resource.ResourceInjectionEnricher;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-
-/**
- * EmbeddedDeploymentAppender
- * 
- * Package the required dependencies needed by the Jboss Embedded Container plugin 
- * to run in container. 
- *
- * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public class JBossASDeploymentAppender implements AuxiliaryArchiveAppender
-{
-
-   public Archive<?> createAuxiliaryArchive()
-   {
-      JavaArchive archive = ShrinkWrap.create("arquillian-jboss-testenrichers.jar", JavaArchive.class)
-                        .addPackages(
-                              true, 
-                              EJBInjectionEnricher.class.getPackage(),
-                              ResourceInjectionEnricher.class.getPackage())
-                        .addServiceProvider(
-                              TestEnricher.class, 
-                              EJBInjectionEnricher.class,
-                              ResourceInjectionEnricher.class);
-      return archive;
-   }
-
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASDeploymentAppender.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss;
+
+import org.jboss.arquillian.spi.AuxiliaryArchiveAppender;
+import org.jboss.arquillian.spi.TestEnricher;
+import org.jboss.arquillian.testenricher.ejb.EJBInjectionEnricher;
+import org.jboss.arquillian.testenricher.resource.ResourceInjectionEnricher;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+
+/**
+ * EmbeddedDeploymentAppender
+ * 
+ * Package the required dependencies needed by the Jboss Embedded Container plugin 
+ * to run in container. 
+ *
+ * @author <a href="mailto:aslak at conduct.no">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public class JBossASDeploymentAppender implements AuxiliaryArchiveAppender
+{
+
+   public Archive<?> createAuxiliaryArchive()
+   {
+      JavaArchive archive = ShrinkWrap.create("arquillian-jboss-testenrichers.jar", JavaArchive.class)
+                        .addPackages(
+                              true, 
+                              EJBInjectionEnricher.class.getPackage(),
+                              ResourceInjectionEnricher.class.getPackage())
+                        .addServiceProvider(
+                              TestEnricher.class, 
+                              EJBInjectionEnricher.class,
+                              ResourceInjectionEnricher.class);
+      return archive;
+   }
+
+}

Deleted: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,358 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jboss.arquillian.jboss.utils.AsLifecycleDelegate;
-import org.jboss.arquillian.protocol.servlet.ServletMethodExecutor;
-import org.jboss.arquillian.spi.Configuration;
-import org.jboss.arquillian.spi.ContainerMethodExecutor;
-import org.jboss.arquillian.spi.Context;
-import org.jboss.arquillian.spi.DeployableContainer;
-import org.jboss.arquillian.spi.DeploymentException;
-import org.jboss.arquillian.spi.LifecycleException;
-import org.jboss.jbossas.servermanager.Server;
-import org.jboss.jbossas.servermanager.ServerController;
-import org.jboss.jbossas.servermanager.ServerManager;
-import org.jboss.logging.Logger;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.exporter.ZipExporter;
-
-/**
- * JbossLocalContainer
- *
- * @author <a href="mailto:aamonten at gmail.com">Alejandro Montenegro</a>
- * @version $Revision: $
- */
-public class JBossASLocalContainer implements DeployableContainer
-{
-   private static Logger log = Logger.getLogger(JBossASLocalContainer.class);
-
-   private static AsLifecycleDelegate delegate;
-
-   protected Server server;
-
-   protected ServerManager manager;
-
-   private boolean wasStarted;
-
-   private final List<String> failedUndeployments = new ArrayList<String>();
-
-   private boolean forceRestart = false;
-
-   private int shutdownDelay = 15000;
-
-   private int bootTimeout = 240000;
-
-   private String host = "localhost";
-
-   private String profile = "default";
-
-   private int port = 8181;
-
-   private JBossASConfiguration configuration;
-
-   public JBossASLocalContainer()
-   {
-
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.spi.DeployableContainer#setup(org.jboss.arquillian.spi.Context, org.jboss.arquillian.spi.Configuration)
-    */
-   public void setup(Context context, Configuration configuration)
-   {
-      this.configuration = configuration.getContainerConfig(JBossASConfiguration.class);
-      host = this.configuration.getBindAddress();
-      profile = this.configuration.getProfileName();
-      port = this.configuration.getHttpPort();
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.spi.DeployableContainer#start(org.jboss.arquillian.spi.Context)
-    */
-   public void start(Context context) throws LifecycleException
-   {
-
-      try
-      {
-         startServerManager();
-         restartServer();
-      }
-      catch (IOException e)
-      {
-         throw new LifecycleException("Could not start local container", e);
-      }
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.spi.DeployableContainer#stop(org.jboss.arquillian.spi.Context)
-    */
-   public void stop(Context context) throws LifecycleException
-   {
-      try
-      {
-         removeFailedUnDeployments();
-      }
-      catch (Exception e)
-      {
-         throw new LifecycleException("Could not clean up", e);
-      }
-      if (wasStarted)
-      {
-         stopServer();
-      }
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.spi.DeployableContainer#deploy(org.jboss.arquillian.spi.Context, org.jboss.shrinkwrap.api.Archive)
-    */
-   public ContainerMethodExecutor deploy(Context context, final Archive<?> archive) throws DeploymentException
-   {
-      if (archive == null)
-      {
-         throw new IllegalArgumentException("Archive must be specified");
-      }
-      if (manager == null || server == null)
-      {
-         throw new IllegalStateException("start has not been called!");
-      }
-      final String deploymentName = archive.getName();
-
-      File file = new File(deploymentName);
-      archive.as(ZipExporter.class).exportZip(file, true);
-
-      Exception failure = null;
-      try
-      {
-         server.deploy(file);
-      }
-      catch (Exception e)
-      {
-         throw new DeploymentException("Could not deploy " + deploymentName, e);
-      }
-      if (failure != null)
-      {
-         throw new DeploymentException("Failed to deploy " + deploymentName, failure);
-      }
-      try
-      {
-         return new ServletMethodExecutor(new URL(server.getHttpUrl().toExternalForm() + "/"));
-      }
-      catch (Exception e)
-      {
-         throw new RuntimeException("Could not create ContainerMethodExecutor", e);
-      }
-   }
-
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.spi.DeployableContainer#undeploy(org.jboss.arquillian.spi.Context, org.jboss.shrinkwrap.api.Archive)
-    */
-   public void undeploy(Context context, Archive<?> archive) throws DeploymentException
-   {
-      if (archive == null)
-      {
-         throw new IllegalArgumentException("Archive must be specified");
-      }
-      File file = new File(archive.getName());
-      archive.as(ZipExporter.class).exportZip(file, true);
-      undeploy(file);
-   }
-
-   private void undeploy(File file) throws DeploymentException
-   {
-      try
-      {
-         server.undeploy(file);
-      }
-      catch (Exception e)
-      {
-         failedUndeployments.add(file.getName());
-         throw new DeploymentException("Could not undeploy " + file.getName(), e);
-      } 
-      finally
-      {
-         file.delete();
-      }
-   }
-
-   private void removeFailedUnDeployments() throws IOException
-   {
-      List<String> remainingDeployments = new ArrayList<String>();
-      for (String name : failedUndeployments)
-      {
-
-         try
-         {
-            server.undeploy(new File(name));
-
-         }
-         catch (Exception e)
-         {
-            IOException ioe = new IOException();
-            ioe.initCause(e);
-            throw ioe;
-         }
-      }
-      if (remainingDeployments.size() > 0)
-      {
-         log.error("Failed to undeploy these artifacts: " + remainingDeployments);
-      }
-      failedUndeployments.clear();
-   }
-
-   protected void startServerManager()
-   {
-      manager = getDelegate().getServerManager();
-      server = new Server();
-      server.setName(profile);
-      server.setHttpPort(port);
-      server.setHost(host);
-      
-      if(configuration.getJbossHome() != null) 
-      {
-         manager.setJbossHome(configuration.getJbossHome());
-      }
-      if(configuration.getJavaHome() != null) 
-      {
-         manager.setJavaHome(configuration.getJavaHome());
-      }
-      
-      AsLifecycleDelegate.applyServerDefaults(server, manager);
-   }
-
-   protected void restartServer() throws IOException, LifecycleException
-   {
-      if (getForceRestart())
-      {
-         if (isServerUp())
-         {
-            log.info("Shutting down server as in force-restart mode");
-            stopServer();
-            try
-            {
-               Thread.sleep(getShutdownDelay());
-            }
-            catch (InterruptedException e)
-            {
-               Thread.currentThread().interrupt();
-            }
-         }
-      }
-      if (!isServerUp())
-      {
-         wasStarted = true;
-         startServer();
-         log.info("Starting server");
-         // Wait for server to come up
-         long timeoutTime = System.currentTimeMillis() + getServerBootTimeout();
-         boolean interrupted = false;
-         while (timeoutTime > System.currentTimeMillis())
-         {
-            if (isServerUp())
-            {
-               log.info("Started server");
-               return;
-            }
-            try
-            {
-               Thread.sleep(200);
-            }
-            catch (InterruptedException e)
-            {
-               interrupted = true;
-            }
-         }
-         if (interrupted)
-         {
-            Thread.currentThread().interrupt();
-         }
-         // If we got this far something went wrong
-         log.info("Unable to connect to server after " + getServerBootTimeout() + "ms, giving up!");
-         stopServer();
-         throw new IllegalStateException("Error connecting to server");
-      }
-   }
-
-   protected void stopServer() throws LifecycleException
-   {
-      try
-      {
-         getDelegate().stopJbossAs(profile);
-      }
-      catch (Throwable t)
-      {
-         throw new LifecycleException("could not stop local container", t);
-      }
-   }
-
-   private void startServer() throws LifecycleException
-   {
-      try
-      {
-         getDelegate().startJbossAs(profile);
-      }
-      catch (Throwable t)
-      {
-         throw new LifecycleException("could not start local container", t);
-      }
-   }
-
-   protected boolean isServerUp() throws IOException
-   {
-      return ServerController.isServerStarted(server);
-   }
-
-   protected synchronized static AsLifecycleDelegate getDelegate()
-   {
-      if (delegate == null)
-      {
-         delegate = new AsLifecycleDelegate();
-      }
-      return delegate;
-   }
-
-   protected String getHost()
-   {
-      return host;
-   }
-
-   protected boolean getForceRestart()
-   {
-      return forceRestart;
-   }
-
-   protected int getShutdownDelay()
-   {
-      return shutdownDelay;
-   }
-
-   protected int getServerBootTimeout()
-   {
-      return bootTimeout;
-   }
-
-   protected int getPort()
-   {
-      return port;
-   }
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/JBossASLocalContainer.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,358 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.arquillian.jboss.utils.AsLifecycleDelegate;
+import org.jboss.arquillian.protocol.servlet.ServletMethodExecutor;
+import org.jboss.arquillian.spi.Configuration;
+import org.jboss.arquillian.spi.ContainerMethodExecutor;
+import org.jboss.arquillian.spi.Context;
+import org.jboss.arquillian.spi.DeployableContainer;
+import org.jboss.arquillian.spi.DeploymentException;
+import org.jboss.arquillian.spi.LifecycleException;
+import org.jboss.jbossas.servermanager.Server;
+import org.jboss.jbossas.servermanager.ServerController;
+import org.jboss.jbossas.servermanager.ServerManager;
+import org.jboss.logging.Logger;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.exporter.ZipExporter;
+
+/**
+ * JbossLocalContainer
+ *
+ * @author <a href="mailto:aamonten at gmail.com">Alejandro Montenegro</a>
+ * @version $Revision: $
+ */
+public class JBossASLocalContainer implements DeployableContainer
+{
+   private static Logger log = Logger.getLogger(JBossASLocalContainer.class);
+
+   private static AsLifecycleDelegate delegate;
+
+   protected Server server;
+
+   protected ServerManager manager;
+
+   private boolean wasStarted;
+
+   private final List<String> failedUndeployments = new ArrayList<String>();
+
+   private boolean forceRestart = false;
+
+   private int shutdownDelay = 15000;
+
+   private int bootTimeout = 240000;
+
+   private String host = "localhost";
+
+   private String profile = "default";
+
+   private int port = 8181;
+
+   private JBossASConfiguration configuration;
+
+   public JBossASLocalContainer()
+   {
+
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.DeployableContainer#setup(org.jboss.arquillian.spi.Context, org.jboss.arquillian.spi.Configuration)
+    */
+   public void setup(Context context, Configuration configuration)
+   {
+      this.configuration = configuration.getContainerConfig(JBossASConfiguration.class);
+      host = this.configuration.getBindAddress();
+      profile = this.configuration.getProfileName();
+      port = this.configuration.getHttpPort();
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.DeployableContainer#start(org.jboss.arquillian.spi.Context)
+    */
+   public void start(Context context) throws LifecycleException
+   {
+
+      try
+      {
+         startServerManager();
+         restartServer();
+      }
+      catch (IOException e)
+      {
+         throw new LifecycleException("Could not start local container", e);
+      }
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.DeployableContainer#stop(org.jboss.arquillian.spi.Context)
+    */
+   public void stop(Context context) throws LifecycleException
+   {
+      try
+      {
+         removeFailedUnDeployments();
+      }
+      catch (Exception e)
+      {
+         throw new LifecycleException("Could not clean up", e);
+      }
+      if (wasStarted)
+      {
+         stopServer();
+      }
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.DeployableContainer#deploy(org.jboss.arquillian.spi.Context, org.jboss.shrinkwrap.api.Archive)
+    */
+   public ContainerMethodExecutor deploy(Context context, final Archive<?> archive) throws DeploymentException
+   {
+      if (archive == null)
+      {
+         throw new IllegalArgumentException("Archive must be specified");
+      }
+      if (manager == null || server == null)
+      {
+         throw new IllegalStateException("start has not been called!");
+      }
+      final String deploymentName = archive.getName();
+
+      File file = new File(deploymentName);
+      archive.as(ZipExporter.class).exportZip(file, true);
+
+      Exception failure = null;
+      try
+      {
+         server.deploy(file);
+      }
+      catch (Exception e)
+      {
+         throw new DeploymentException("Could not deploy " + deploymentName, e);
+      }
+      if (failure != null)
+      {
+         throw new DeploymentException("Failed to deploy " + deploymentName, failure);
+      }
+      try
+      {
+         return new ServletMethodExecutor(new URL(server.getHttpUrl().toExternalForm() + "/"));
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Could not create ContainerMethodExecutor", e);
+      }
+   }
+
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.spi.DeployableContainer#undeploy(org.jboss.arquillian.spi.Context, org.jboss.shrinkwrap.api.Archive)
+    */
+   public void undeploy(Context context, Archive<?> archive) throws DeploymentException
+   {
+      if (archive == null)
+      {
+         throw new IllegalArgumentException("Archive must be specified");
+      }
+      File file = new File(archive.getName());
+      archive.as(ZipExporter.class).exportZip(file, true);
+      undeploy(file);
+   }
+
+   private void undeploy(File file) throws DeploymentException
+   {
+      try
+      {
+         server.undeploy(file);
+      }
+      catch (Exception e)
+      {
+         failedUndeployments.add(file.getName());
+         throw new DeploymentException("Could not undeploy " + file.getName(), e);
+      } 
+      finally
+      {
+         file.delete();
+      }
+   }
+
+   private void removeFailedUnDeployments() throws IOException
+   {
+      List<String> remainingDeployments = new ArrayList<String>();
+      for (String name : failedUndeployments)
+      {
+
+         try
+         {
+            server.undeploy(new File(name));
+
+         }
+         catch (Exception e)
+         {
+            IOException ioe = new IOException();
+            ioe.initCause(e);
+            throw ioe;
+         }
+      }
+      if (remainingDeployments.size() > 0)
+      {
+         log.error("Failed to undeploy these artifacts: " + remainingDeployments);
+      }
+      failedUndeployments.clear();
+   }
+
+   protected void startServerManager()
+   {
+      manager = getDelegate().getServerManager();
+      server = new Server();
+      server.setName(profile);
+      server.setHttpPort(port);
+      server.setHost(host);
+      
+      if(configuration.getJbossHome() != null) 
+      {
+         manager.setJbossHome(configuration.getJbossHome());
+      }
+      if(configuration.getJavaHome() != null) 
+      {
+         manager.setJavaHome(configuration.getJavaHome());
+      }
+      
+      AsLifecycleDelegate.applyServerDefaults(server, manager);
+   }
+
+   protected void restartServer() throws IOException, LifecycleException
+   {
+      if (getForceRestart())
+      {
+         if (isServerUp())
+         {
+            log.info("Shutting down server as in force-restart mode");
+            stopServer();
+            try
+            {
+               Thread.sleep(getShutdownDelay());
+            }
+            catch (InterruptedException e)
+            {
+               Thread.currentThread().interrupt();
+            }
+         }
+      }
+      if (!isServerUp())
+      {
+         wasStarted = true;
+         startServer();
+         log.info("Starting server");
+         // Wait for server to come up
+         long timeoutTime = System.currentTimeMillis() + getServerBootTimeout();
+         boolean interrupted = false;
+         while (timeoutTime > System.currentTimeMillis())
+         {
+            if (isServerUp())
+            {
+               log.info("Started server");
+               return;
+            }
+            try
+            {
+               Thread.sleep(200);
+            }
+            catch (InterruptedException e)
+            {
+               interrupted = true;
+            }
+         }
+         if (interrupted)
+         {
+            Thread.currentThread().interrupt();
+         }
+         // If we got this far something went wrong
+         log.info("Unable to connect to server after " + getServerBootTimeout() + "ms, giving up!");
+         stopServer();
+         throw new IllegalStateException("Error connecting to server");
+      }
+   }
+
+   protected void stopServer() throws LifecycleException
+   {
+      try
+      {
+         getDelegate().stopJbossAs(profile);
+      }
+      catch (Throwable t)
+      {
+         throw new LifecycleException("could not stop local container", t);
+      }
+   }
+
+   private void startServer() throws LifecycleException
+   {
+      try
+      {
+         getDelegate().startJbossAs(profile);
+      }
+      catch (Throwable t)
+      {
+         throw new LifecycleException("could not start local container", t);
+      }
+   }
+
+   protected boolean isServerUp() throws IOException
+   {
+      return ServerController.isServerStarted(server);
+   }
+
+   protected synchronized static AsLifecycleDelegate getDelegate()
+   {
+      if (delegate == null)
+      {
+         delegate = new AsLifecycleDelegate();
+      }
+      return delegate;
+   }
+
+   protected String getHost()
+   {
+      return host;
+   }
+
+   protected boolean getForceRestart()
+   {
+      return forceRestart;
+   }
+
+   protected int getShutdownDelay()
+   {
+      return shutdownDelay;
+   }
+
+   protected int getServerBootTimeout()
+   {
+      return bootTimeout;
+   }
+
+   protected int getPort()
+   {
+      return port;
+   }
+}

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils)

Deleted: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,184 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss.utils;
-
-import org.jboss.jbossas.servermanager.Server;
-import org.jboss.jbossas.servermanager.ServerController;
-import org.jboss.jbossas.servermanager.ServerManager;
-import org.jboss.jbossas.servermanager.Argument;
-import org.jboss.jbossas.servermanager.Property;
-
-import java.io.File;
-
-/**
- * @author <a href="mailto:aamonten at gmail.com">Alejandro Montenegro</a>
- */
-public class AsLifecycleDelegate
-{
-
-   /*
-    * Environment Variables
-    */
-
-   private static final String ENV_VAR_JAVA_HOME = "JAVA_HOME";
-
-   private static final String ENV_VAR_JBOSS_HOME = "JBOSS_HOME";
-
-   private ServerManager serverManager;
-
-   /**
-    * Constructor
-    */
-   public AsLifecycleDelegate()
-   {
-      // Create and set a new ServerManager
-      ServerManager sm = new ServerManager();
-      applyServerManagerDefaults(sm);
-      this.setServerManager(sm);
-   }
-
-   /**
-    * Lifecycle Start
-    *
-    * Starts JBossASs
-    *
-    * @throws Throwable
-    */
-   public void startJbossAs(String serverName) throws Throwable
-   {
-      Server server = null;
-
-      // Get ServerManager
-      ServerManager manager = this.getServerManager();
-
-      try
-      {
-         server = manager.getServer(serverName);
-      }
-      catch (IllegalArgumentException e)
-      {
-         // Create the Server
-         server = new Server();
-         server.setName(serverName);
-
-         // Add a Server to the Manager with defaults
-         applyServerDefaults(server, manager);
-      }
-
-      // Start the Server
-      ServerController.startServer(server, manager);
-   }
-
-   /**
-    * Lifecycle Stop
-    *
-    * Stops JBossAS
-    *
-    * @throws Throwable
-    */
-   public void stopJbossAs(String serverName) throws Throwable
-   {
-      // Obtain the server
-      ServerManager manager = this.getServerManager();
-      Server server = manager.getServer(serverName);
-
-      // If started/running
-      if (ServerController.isServerStarted(server))
-      {
-         // Stop
-         ServerController.stopServer(server, manager);
-      }
-   }
-
-   /**
-    * Apply defaults to ServerManager
-    *
-    * @param manager the server manager to apply defaults to
-    * @return the server manager with applied defaults
-    */
-   public static ServerManager applyServerManagerDefaults(final ServerManager manager)
-   {
-      // Set JVM / JBOSS_HOME
-      manager.setJavaHome(getJavaHome());
-      manager.setJbossHome(getJbossHome());
-
-      // Set UDP group to use
-      // manager.setUdpGroup("241.34.53.227");
-
-      return manager;
-   }
-
-   /**
-    * Apply defaults to Server
-    *
-    * @param server the server to apply defaults to
-    * @return the Server with applied defaults
-    */
-   public static Server applyServerDefaults(final Server server, final ServerManager manager)
-   {
-      // add Server to manager
-      manager.addServer(server);
-
-      server.setUsername("admin");
-      server.setPassword("admin");
-      server.setPartition(Long.toHexString(System.currentTimeMillis()));
-
-      // Set server's JVM arguments
-      Argument arg = new Argument();
-      arg.setValue("-Xmx512m");
-      server.addJvmArg(arg);
-      arg = new Argument();
-      arg.setValue("-XX:MaxPermSize=128m");
-      server.addJvmArg(arg);
-
-      // Set server's system properties
-      Property prop = new Property();
-      prop.setKey("jbosstest.udp.ip_ttl");
-      prop.setValue("0");
-      server.addSysProperty(prop);
-      prop = new Property();
-      prop.setKey("java.endorsed.dirs");
-      prop.setValue(new File(manager.getJBossHome(), "lib/endorsed").getAbsolutePath());
-      server.addSysProperty(prop);
-
-      return server;
-   }
-
-   //----------------------------------------------------------------------------------||
-   // Internal Helper Methods ---------------------------------------------------------||
-   //----------------------------------------------------------------------------------||
-
-   public static String getJavaHome()
-   {
-      return System.getenv(ENV_VAR_JAVA_HOME);
-   }
-
-   public static String getJbossHome()
-   {
-      return System.getenv(ENV_VAR_JBOSS_HOME);
-   }
-
-   public ServerManager getServerManager()
-   {
-      return serverManager;
-   }
-
-   private void setServerManager(ServerManager manager)
-   {
-      this.serverManager = manager;
-   }
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/java/org/jboss/arquillian/jboss/utils/AsLifecycleDelegate.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,184 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss.utils;
+
+import org.jboss.jbossas.servermanager.Server;
+import org.jboss.jbossas.servermanager.ServerController;
+import org.jboss.jbossas.servermanager.ServerManager;
+import org.jboss.jbossas.servermanager.Argument;
+import org.jboss.jbossas.servermanager.Property;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:aamonten at gmail.com">Alejandro Montenegro</a>
+ */
+public class AsLifecycleDelegate
+{
+
+   /*
+    * Environment Variables
+    */
+
+   private static final String ENV_VAR_JAVA_HOME = "JAVA_HOME";
+
+   private static final String ENV_VAR_JBOSS_HOME = "JBOSS_HOME";
+
+   private ServerManager serverManager;
+
+   /**
+    * Constructor
+    */
+   public AsLifecycleDelegate()
+   {
+      // Create and set a new ServerManager
+      ServerManager sm = new ServerManager();
+      applyServerManagerDefaults(sm);
+      this.setServerManager(sm);
+   }
+
+   /**
+    * Lifecycle Start
+    *
+    * Starts JBossASs
+    *
+    * @throws Throwable
+    */
+   public void startJbossAs(String serverName) throws Throwable
+   {
+      Server server = null;
+
+      // Get ServerManager
+      ServerManager manager = this.getServerManager();
+
+      try
+      {
+         server = manager.getServer(serverName);
+      }
+      catch (IllegalArgumentException e)
+      {
+         // Create the Server
+         server = new Server();
+         server.setName(serverName);
+
+         // Add a Server to the Manager with defaults
+         applyServerDefaults(server, manager);
+      }
+
+      // Start the Server
+      ServerController.startServer(server, manager);
+   }
+
+   /**
+    * Lifecycle Stop
+    *
+    * Stops JBossAS
+    *
+    * @throws Throwable
+    */
+   public void stopJbossAs(String serverName) throws Throwable
+   {
+      // Obtain the server
+      ServerManager manager = this.getServerManager();
+      Server server = manager.getServer(serverName);
+
+      // If started/running
+      if (ServerController.isServerStarted(server))
+      {
+         // Stop
+         ServerController.stopServer(server, manager);
+      }
+   }
+
+   /**
+    * Apply defaults to ServerManager
+    *
+    * @param manager the server manager to apply defaults to
+    * @return the server manager with applied defaults
+    */
+   public static ServerManager applyServerManagerDefaults(final ServerManager manager)
+   {
+      // Set JVM / JBOSS_HOME
+      manager.setJavaHome(getJavaHome());
+      manager.setJbossHome(getJbossHome());
+
+      // Set UDP group to use
+      // manager.setUdpGroup("241.34.53.227");
+
+      return manager;
+   }
+
+   /**
+    * Apply defaults to Server
+    *
+    * @param server the server to apply defaults to
+    * @return the Server with applied defaults
+    */
+   public static Server applyServerDefaults(final Server server, final ServerManager manager)
+   {
+      // add Server to manager
+      manager.addServer(server);
+
+      server.setUsername("admin");
+      server.setPassword("admin");
+      server.setPartition(Long.toHexString(System.currentTimeMillis()));
+
+      // Set server's JVM arguments
+      Argument arg = new Argument();
+      arg.setValue("-Xmx512m");
+      server.addJvmArg(arg);
+      arg = new Argument();
+      arg.setValue("-XX:MaxPermSize=128m");
+      server.addJvmArg(arg);
+
+      // Set server's system properties
+      Property prop = new Property();
+      prop.setKey("jbosstest.udp.ip_ttl");
+      prop.setValue("0");
+      server.addSysProperty(prop);
+      prop = new Property();
+      prop.setKey("java.endorsed.dirs");
+      prop.setValue(new File(manager.getJBossHome(), "lib/endorsed").getAbsolutePath());
+      server.addSysProperty(prop);
+
+      return server;
+   }
+
+   //----------------------------------------------------------------------------------||
+   // Internal Helper Methods ---------------------------------------------------------||
+   //----------------------------------------------------------------------------------||
+
+   public static String getJavaHome()
+   {
+      return System.getenv(ENV_VAR_JAVA_HOME);
+   }
+
+   public static String getJbossHome()
+   {
+      return System.getenv(ENV_VAR_JBOSS_HOME);
+   }
+
+   public ServerManager getServerManager()
+   {
+      return serverManager;
+   }
+
+   private void setServerManager(ServerManager manager)
+   {
+      this.serverManager = manager;
+   }
+}

Modified: arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-06-15 12:20:50 UTC (rev 4525)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.AuxiliaryArchiveAppender	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1 +1 @@
-org.jboss.arquillian.jbossas.local51.JBossASDeploymentAppender
\ No newline at end of file
+org.jboss.arquillian.jboss.JBossASDeploymentAppender
\ No newline at end of file

Modified: arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration	2010-06-15 12:20:50 UTC (rev 4525)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.ContainerConfiguration	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1 +1 @@
-org.jboss.arquillian.jbossas.local51.JBossASConfiguration
\ No newline at end of file
+org.jboss.arquillian.jboss.JBossASConfiguration
\ No newline at end of file

Modified: arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer	2010-06-15 12:20:50 UTC (rev 4525)
+++ arquillian/trunk/containers/jbossas-local-51/src/main/resources/META-INF/services/org.jboss.arquillian.spi.DeployableContainer	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1 +1 @@
-org.jboss.arquillian.jbossas.local51.JBossASLocalContainer
\ No newline at end of file
+org.jboss.arquillian.jboss.JBossASLocalContainer
\ No newline at end of file

Copied: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss)

Deleted: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss;
-
-import javax.ejb.EJB;
-
-import junit.framework.Assert;
-
-import org.jboss.arquillian.api.Deployment;
-import org.jboss.arquillian.jboss.ejb.MyEjb;
-import org.jboss.arquillian.jboss.ejb.MyEjbBean;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-/**
- * JBossEmbeddedIntegrationTestCase
- *
- * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
- * @version $Revision: $
- */
- at Ignore // TODO: Add auto extract of 5.1 container. No Maven based dist for 5.1, download from sourceforge? 
- at RunWith(Arquillian.class)
-public class JBossASIntegrationTestCase
-{
-   @Deployment
-   public static JavaArchive createDeployment() throws Exception 
-   {
-      return ShrinkWrap.create("test.jar", JavaArchive.class)
-               .addClasses(
-                     JBossASIntegrationTestCase.class,
-                     MyEjb.class, MyEjbBean.class);
-   }
-   
-   @EJB
-   private MyEjb instanceVariable;
-   
-   @Test
-   public void shouldBeAbleToInjectEJBAsInstanceVariable() throws Exception 
-   {
-      Assert.assertNotNull(
-            "Verify that the Bean has been injected",
-            instanceVariable);
-      
-      Assert.assertEquals("aslak", instanceVariable.getName());
-   }
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/JBossASIntegrationTestCase.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss;
+
+import javax.ejb.EJB;
+
+import junit.framework.Assert;
+
+import org.jboss.arquillian.api.Deployment;
+import org.jboss.arquillian.jboss.ejb.MyEjb;
+import org.jboss.arquillian.jboss.ejb.MyEjbBean;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+/**
+ * JBossEmbeddedIntegrationTestCase
+ *
+ * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+ at Ignore // TODO: Add auto extract of 5.1 container. No Maven based dist for 5.1, download from sourceforge? 
+ at RunWith(Arquillian.class)
+public class JBossASIntegrationTestCase
+{
+   @Deployment
+   public static JavaArchive createDeployment() throws Exception 
+   {
+      return ShrinkWrap.create("test.jar", JavaArchive.class)
+               .addClasses(
+                     JBossASIntegrationTestCase.class,
+                     MyEjb.class, MyEjbBean.class);
+   }
+   
+   @EJB
+   private MyEjb instanceVariable;
+   
+   @Test
+   public void shouldBeAbleToInjectEJBAsInstanceVariable() throws Exception 
+   {
+      Assert.assertNotNull(
+            "Verify that the Bean has been injected",
+            instanceVariable);
+      
+      Assert.assertEquals("aslak", instanceVariable.getName());
+   }
+}

Copied: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb)

Deleted: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,29 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss.ejb;
-
-/**
- *
- * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
- * @version $Revision: $
- */
-public interface MyEjb
-{
-
-   public String getName();
-
-}
\ No newline at end of file

Copied: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjb.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,29 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss.ejb;
+
+/**
+ *
+ * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+public interface MyEjb
+{
+
+   public String getName();
+
+}
\ No newline at end of file

Deleted: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java	2010-05-22 19:25:59 UTC (rev 4408)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.arquillian.jboss.ejb;
-
-import javax.ejb.Local;
-import javax.ejb.Stateless;
-
-/**
- * MyEjb
- *
- * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
- * @version $Revision: $
- */
- at Stateless
- at Local(MyEjb.class)
-public class MyEjbBean implements MyEjb
-{
-   /* (non-Javadoc)
-    * @see org.jboss.arquillian.jboss.ejb.MyEjb#getName()
-    */
-   public String getName() 
-   {
-      return "aslak";
-   }
-}

Copied: arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java (from rev 4408, arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java)
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java	                        (rev 0)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/java/org/jboss/arquillian/jboss/ejb/MyEjbBean.java	2010-06-15 12:22:18 UTC (rev 4526)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.arquillian.jboss.ejb;
+
+import javax.ejb.Local;
+import javax.ejb.Stateless;
+
+/**
+ * MyEjb
+ *
+ * @author <a href="mailto:aslak at redhat.com">Aslak Knutsen</a>
+ * @version $Revision: $
+ */
+ at Stateless
+ at Local(MyEjb.class)
+public class MyEjbBean implements MyEjb
+{
+   /* (non-Javadoc)
+    * @see org.jboss.arquillian.jboss.ejb.MyEjb#getName()
+    */
+   public String getName() 
+   {
+      return "aslak";
+   }
+}

Modified: arquillian/trunk/containers/jbossas-local-51/src/test/resources/arquillian.xml
===================================================================
--- arquillian/trunk/containers/jbossas-local-51/src/test/resources/arquillian.xml	2010-06-15 12:20:50 UTC (rev 4525)
+++ arquillian/trunk/containers/jbossas-local-51/src/test/resources/arquillian.xml	2010-06-15 12:22:18 UTC (rev 4526)
@@ -2,7 +2,7 @@
 
 <arquillian xmlns="http://jboss.com/arquillian"
 		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-		xmlns:jboss="urn:arq:org.jboss.arquillian.jbossas.local51">
+		xmlns:jboss="urn:arq:org.jboss.arquillian.jboss">
 
 	<jboss:container>
 		<jbossHome>/home/aslak/dev/servers/jboss-5.1.0.GA/</jbossHome>



More information about the jboss-svn-commits mailing list