[jboss-cvs] JBossAS SVN: r105510 - in projects/ejb3/components/embedded/trunk: api-shrinkwrap/src/main/java and 28 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Jun 1 18:09:54 EDT 2010


Author: ALRubinger
Date: 2010-06-01 18:09:53 -0400 (Tue, 01 Jun 2010)
New Revision: 105510

Added:
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/shrinkwrap/
   projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/shrinkwrap/ShrinkWrapEJBContainer.java
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/shrinkwrap/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImpl.java
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/shrinkwrap/
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImplUnitTest.java
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/resources/log4j.xml
   projects/ejb3/components/embedded/trunk/spi/src/main/java/org/jboss/ejb3/embedded/spi/JBossEJBContainerProvider.java
Modified:
   projects/ejb3/components/embedded/trunk/api/src/main/java/org/jboss/ejb3/embedded/api/JBossEJBContainer.java
   projects/ejb3/components/embedded/trunk/build/pom.xml
   projects/ejb3/components/embedded/trunk/impl-base/pom.xml
   projects/ejb3/components/embedded/trunk/impl-base/src/main/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBase.java
   projects/ejb3/components/embedded/trunk/impl-base/src/test/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBaseUnitTest.java
   projects/ejb3/components/embedded/trunk/impl-shrinkwrap/pom.xml
   projects/ejb3/components/embedded/trunk/spi/pom.xml
Log:
[EJBTHREE-2083] Separate out the ShrinkWrap extension

Modified: projects/ejb3/components/embedded/trunk/api/src/main/java/org/jboss/ejb3/embedded/api/JBossEJBContainer.java
===================================================================
--- projects/ejb3/components/embedded/trunk/api/src/main/java/org/jboss/ejb3/embedded/api/JBossEJBContainer.java	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/api/src/main/java/org/jboss/ejb3/embedded/api/JBossEJBContainer.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -25,12 +25,8 @@
 import javax.ejb.embeddable.EJBContainer;
 import javax.naming.Context;
 
-import org.jboss.shrinkwrap.api.Archive;
-
 /**
  * End-user view of JBoss {@link EJBContainer} implementation.
- * In addition to exposing some support within {@link EJBContainer},
- * this makes available explicit user deployment and undeployment.
  * 
  * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
  * @version $Revision: $
@@ -55,21 +51,4 @@
     * @see {@link EJBContainer#close()}
     */
    void close();
-
-   /**
-    * Deploys the specified {@link Archive}s into the container. 
-    * @param archives
-    * @throws EJBDeploymentException If an error occurred in deployment
-    * @throws IllegalArgumentException If archives is null
-    */
-   void deploy(Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException;
-
-   /**
-    * Undeploys the specified {@link Archive}s from the container.  
-    * @param archives
-    * @throws EJBDeploymentException If an error occurred in deployment
-    * @throws IllegalArgumentException If archives is null
-    */
-   void undeploy(Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException;
-
 }

Added: projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/shrinkwrap/ShrinkWrapEJBContainer.java
===================================================================
--- projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/shrinkwrap/ShrinkWrapEJBContainer.java	                        (rev 0)
+++ projects/ejb3/components/embedded/trunk/api-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/api/shrinkwrap/ShrinkWrapEJBContainer.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 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.ejb3.embedded.api.shrinkwrap;
+
+import javax.ejb.embeddable.EJBContainer;
+
+import org.jboss.ejb3.embedded.api.EJBDeploymentException;
+import org.jboss.ejb3.embedded.api.JBossEJBContainer;
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * End-user view of JBoss {@link EJBContainer} implementation
+ * capable of deploying/undeploying  ShrinkWrap {@link Archive}s. 
+ * In addition to exposing some support within {@link EJBContainer},
+ * this makes available explicit user deployment and undeployment.
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ShrinkWrapEJBContainer extends JBossEJBContainer
+{
+   /**
+    * Deploys the specified {@link Archive}s into the container. 
+    * @param archives
+    * @throws EJBDeploymentException If an error occurred in deployment
+    * @throws IllegalArgumentException If archives is null
+    */
+   void deploy(Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException;
+
+   /**
+    * Undeploys the specified {@link Archive}s from the container.  
+    * @param archives
+    * @throws EJBDeploymentException If an error occurred in deployment
+    * @throws IllegalArgumentException If archives is null
+    */
+   void undeploy(Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException;
+}

Modified: projects/ejb3/components/embedded/trunk/build/pom.xml
===================================================================
--- projects/ejb3/components/embedded/trunk/build/pom.xml	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/build/pom.xml	2010-06-01 22:09:53 UTC (rev 105510)
@@ -34,6 +34,8 @@
     <version.org.jboss.logging>2.2.0.CR1</version.org.jboss.logging>
     <version.org.jboss.shrinkwrap>1.0.0-SNAPSHOT</version.org.jboss.shrinkwrap>
     <version.org.jboss.vfs>3.0.0.CR5</version.org.jboss.vfs>
+    <version.org.jboss.threads>2.0.0.CR4</version.org.jboss.threads>
+    <version.org.jboss_jboss.mdr>2.2.0.Alpha2</version.org.jboss_jboss.mdr>
 
   </properties>
 
@@ -189,6 +191,23 @@
         <artifactId>shrinkwrap-extension-vfs3</artifactId>
         <version>${version.org.jboss.shrinkwrap}</version>
       </dependency>
+      
+      <dependency>
+        <groupId>org.jboss.threads</groupId>
+        <artifactId>jboss-threads</artifactId>
+        <version>${version.org.jboss.threads}</version>
+      </dependency>
+      <dependency>
+        <groupId>org.jboss.threads</groupId>
+        <artifactId>jboss-threads-metadata</artifactId>
+        <version>${version.org.jboss.threads}</version>
+      </dependency>
+      
+      <dependency>
+        <groupId>org.jboss</groupId>
+        <artifactId>jboss-mdr</artifactId>
+        <version>${version.org.jboss_jboss.mdr}</version>
+      </dependency>
 
     </dependencies>
   </dependencyManagement>

Modified: projects/ejb3/components/embedded/trunk/impl-base/pom.xml
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-base/pom.xml	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/impl-base/pom.xml	2010-06-01 22:09:53 UTC (rev 105510)
@@ -27,11 +27,7 @@
   
   </build>
   
-  <properties>
-  
-    <!-- Versioning -->
-     <version.org.jboss.threads>2.0.0.CR4</version.org.jboss.threads>
-     
+  <properties>     
 
   </properties>
 
@@ -50,11 +46,6 @@
     </dependency>
     
     <dependency>
-      <groupId>org.jboss.reloaded</groupId>
-      <artifactId>jboss-reloaded-vdf-bootstrap-minimal</artifactId>
-    </dependency>
-    
-    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>
@@ -74,25 +65,11 @@
       <artifactId>shrinkwrap-extension-vfs3</artifactId>
       <scope>test</scope>
     </dependency>
+    
     <dependency>
-      <groupId>org.jboss.shrinkwrap</groupId>
-      <artifactId>shrinkwrap-extension-vdf</artifactId>
-      <scope>provided</scope>
+      <groupId>org.jboss.reloaded</groupId>
+      <artifactId>jboss-reloaded-vdf-bootstrap-minimal</artifactId>
     </dependency>
-
-    <!-- JBoss Threads (needed for as long as we've got ShrinkWrapDeployer in use) -->
-    <dependency>
-      <groupId>org.jboss.threads</groupId>
-      <artifactId>jboss-threads</artifactId>
-      <version>${version.org.jboss.threads}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.jboss.threads</groupId>
-      <artifactId>jboss-threads-metadata</artifactId>
-      <version>${version.org.jboss.threads}</version>
-      <scope>test</scope>
-    </dependency>
     
     <dependency>
       <groupId>org.jboss.naming</groupId>

Modified: projects/ejb3/components/embedded/trunk/impl-base/src/main/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBase.java
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-base/src/main/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBase.java	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/impl-base/src/main/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBase.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -21,10 +21,10 @@
  */
 package org.jboss.ejb3.embedded.impl.base;
 
-import java.io.IOException;
 import java.net.URISyntaxException;
 import java.net.URL;
 import java.util.Arrays;
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
@@ -42,12 +42,10 @@
 import org.jboss.deployers.vfs.spi.client.VFSDeployment;
 import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
 import org.jboss.ejb3.embedded.api.EJBDeploymentException;
-import org.jboss.ejb3.embedded.api.JBossEJBContainer;
 import org.jboss.ejb3.embedded.impl.base.scanner.ClassPathEjbJarScanner;
+import org.jboss.ejb3.embedded.spi.JBossEJBContainerProvider;
 import org.jboss.kernel.Kernel;
 import org.jboss.logging.Logger;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.vdf.api.ShrinkWrapDeployer;
 import org.jboss.vfs.VFS;
 import org.jboss.vfs.VirtualFile;
 
@@ -55,11 +53,13 @@
  * Base for JBoss {@link EJBContainer}s.  Provides
  * support for deployment operations backed by a supplied {@link MCServer}
  * to be provided by concrete implementations.
+ * 
+ * Not thread-safe.
  *
  * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
  * @version $Revision: $
  */
-public abstract class JBossEJBContainerBase extends EJBContainer implements JBossEJBContainer
+public abstract class JBossEJBContainerBase extends EJBContainer implements JBossEJBContainerProvider
 {
 
    //-------------------------------------------------------------------------------------||
@@ -88,14 +88,8 @@
    /**
     * All deployments currently installed via this container
     */
-   private final Set<Deployment> deployments;
+   private final Map<URL, Deployment> deployments;
 
-   /**
-    * @see @see http://community.jboss.org/message/540998
-    */
-   @Deprecated
-   private final ShrinkWrapDeployer shrinkWrapDeployer;
-
    //-------------------------------------------------------------------------------------||
    // Constructor ------------------------------------------------------------------------||
    //-------------------------------------------------------------------------------------||
@@ -110,11 +104,6 @@
       // Get Kernel
       final Kernel kernel = server.getKernel();
 
-      // Obtain ShrinkWrapDeployer
-      final ShrinkWrapDeployer shrinkWrapDeployer = (ShrinkWrapDeployer) kernel.getController().getContextByClass(
-            ShrinkWrapDeployer.class).getTarget();
-      assert shrinkWrapDeployer != null : "ShrinkWrapDeployer found in Kernel was null";
-
       // Obtain MainDeployer
       final MainDeployer mainDeployer = (MainDeployer) kernel.getController().getContextByClass(MainDeployer.class)
             .getTarget();
@@ -126,8 +115,7 @@
       // Set
       this.mcServer = server;
       this.deployer = mainDeployer;
-      this.deployments = new HashSet<Deployment>();
-      this.shrinkWrapDeployer = shrinkWrapDeployer;
+      this.deployments = new HashMap<URL, Deployment>();
    }
 
    protected JBossEJBContainerBase(final Map<?, ?> properties, final MCServer server)
@@ -155,7 +143,7 @@
       }
 
       // Mark deployments added
-      final Set<Deployment> deploymentsAdded = new HashSet<Deployment>();
+      final Set<Deployment> deploymentsAdded = new HashSet<Deployment>(deployments.length);
 
       // Add all deployments
       for (final Deployment deployment : deployments)
@@ -204,30 +192,72 @@
       {
          throw EJBDeploymentException.newInstance("Processing the pending deployments resulted in error", e);
       }
+   }
 
-      // Mark we've got new deployments
-      this.deployments.addAll(deploymentsAdded);
+   /**
+    * Undeploys the specified {@link Deployment}s into the Container
+    * 
+    * @param deployments One or more {@link Deployment}s to undeploy
+    * @throws DeploymentException If an error occurred in deployment
+    * @throws IllegalArgumentException If at least one {@link Deployment} was not specified
+    */
+   protected void undeploy(final Deployment... deployments) throws EJBDeploymentException, IllegalArgumentException
+   {
+      // Precondition checks
+      if (deployments == null || deployments.length == 0)
+      {
+         throw new IllegalArgumentException("At least one deployment must be specified");
+      }
 
+      // Add all deployments
+      for (final Deployment deployment : deployments)
+      {
+         if (log.isTraceEnabled())
+         {
+            log.tracef("Removing deployment: ", deployment);
+         }
+         try
+         {
+            // Remove from the deployer
+            deployer.removeDeployment(deployment);
+         }
+         catch (final DeploymentException mainDeploymentException)
+         {
+            // Translate exception to our API
+            throw EJBDeploymentException.newInstance("Could not remove deployment: " + deployment,
+                  mainDeploymentException);
+         }
+      }
+
+      // Process and ensure everything's OK
+      deployer.process();
+      try
+      {
+         deployer.checkComplete();
+      }
+      catch (final DeploymentException e)
+      {
+         throw EJBDeploymentException.newInstance("Processing the removed deployments resulted in error", e);
+      }
    }
 
    /**
     * Deploys the specified {@link URL}s into the Container
     * 
-    * @param urls URLs to deploy; at least one must be specified
-    * @throws DeploymentException If an error occurred during deployment
-    * @throws IOException
+    * @param urls URLs to deploy; must be specified, even if empty
+    * @throws EJBDeploymentException If an error occurred during deployment
     * @throws IllegalArgumentException
     */
    protected void deploy(final URL... urls) throws EJBDeploymentException, IllegalArgumentException
    {
       // Precondition checks
-      if (urls == null || urls.length == 0)
+      if (urls == null)
       {
-         throw new IllegalArgumentException("At least one URL for deployment must be specified");
+         throw new IllegalArgumentException("URLs must be specified");
       }
 
       // Hold the deployments
-      final Deployment[] deployments = new Deployment[urls.length];
+      final Map<URL, Deployment> newDeployments = new HashMap<URL, Deployment>(urls.length);
 
       // For each URL, make a Deployment
       for (int i = 0; i < urls.length; i++)
@@ -243,70 +273,71 @@
             throw new RuntimeException("Could not create a virtual file to deploy from URL: " + url, urise);
          }
          final VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(root);
-         deployments[i] = deployment;
+         newDeployments.put(url, deployment);
       }
 
       // Delegate to real deployment
-      this.deploy(deployments);
+      this.deploy(newDeployments.values().toArray(new Deployment[]
+      {}));
+
+      // Mark these are done
+      this.deployments.putAll(newDeployments);
    }
 
    /**
-    * {@inheritDoc}
-    * @see org.jboss.ejb3.embedded.api.JBossEJBContainer#deploy(org.jboss.shrinkwrap.api.Archive<?>[])
+    * Undeploys the specified {@link URL}s from the Container.  If a {@link URL}
+    * is specified that has not been previously deployed via this view, it will be ignored.
+    * 
+    * @param urls URLs to undeploy; at least one must be specified
+    * @throws EJBDeploymentException If an error occurred during deployment
+    * @throws IllegalArgumentException
     */
-   @Override
-   public void deploy(final Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException
+   protected void undeploy(final URL... urls) throws EJBDeploymentException, IllegalArgumentException
    {
       // Precondition checks
-      if (archives == null)
+      if (urls == null)
       {
-         throw new IllegalArgumentException("archives must be supplied");
+         throw new IllegalArgumentException("URLs must be specified");
       }
 
-      // Deploy
-      try
+      // Get the Deployments for the URLs
+      final Set<Deployment> deploymentsToRemove = new HashSet<Deployment>();
+      final Set<URL> urlsToUnregister = new HashSet<URL>();
+      for (final URL url : urls)
       {
-         shrinkWrapDeployer.deploy(archives);
+         // Lookup
+         final Deployment deployment = this.deployments.get(url);
+         if (deployment == null)
+         {
+            if (log.isDebugEnabled())
+            {
+               log.debug("Ignoring undeployment request of " + url.toExternalForm()
+                     + "; has not been previously deployed via " + this);
+            }
+         }
+         else
+         {
+            deploymentsToRemove.add(deployment);
+            urlsToUnregister.add(url);
+         }
       }
-      catch (final DeploymentException e)
-      {
-         // Translate
-         throw EJBDeploymentException.newInstance("Could not deploy " + Arrays.asList(archives), e);
-      }
-   }
 
-   /**
-    * {@inheritDoc}
-    * @see org.jboss.ejb3.embedded.api.JBossEJBContainer#undeploy(org.jboss.shrinkwrap.api.Archive<?>[])
-    */
-   @Override
-   public void undeploy(final Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException
-   {
-      // Precondition checks
-      if (archives == null)
+      // Undeploy
+      this.undeploy(deploymentsToRemove.toArray(new Deployment[]
+      {}));
+      // Mark removed
+      for (final URL url : urlsToUnregister)
       {
-         throw new IllegalArgumentException("archives must be supplied");
+         this.deployments.remove(url);
       }
 
-      // Undeploy
-      try
-      {
-         shrinkWrapDeployer.undeploy(archives);
-      }
-      catch (final DeploymentException e)
-      {
-         // Translate
-         throw EJBDeploymentException.newInstance("Could not undeploy " + Arrays.asList(archives), e);
-      }
    }
 
    /**
-    * Exposes the underlying {@link MCServer} to children; take care not to expose this to 
-    * end users (clients).
-    * 
-    * @return
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.embedded.spi.JBossEJBContainerProvider#getMCServer()
     */
-   protected MCBasedServer<?, ?> getMCServer()
+   public MCBasedServer<?, ?> getMCServer()
    {
       return mcServer;
    }

Modified: projects/ejb3/components/embedded/trunk/impl-base/src/test/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBaseUnitTest.java
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-base/src/test/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBaseUnitTest.java	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/impl-base/src/test/java/org/jboss/ejb3/embedded/impl/base/JBossEJBContainerBaseUnitTest.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -22,6 +22,7 @@
 
 package org.jboss.ejb3.embedded.impl.base;
 
+import java.io.File;
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.List;
@@ -30,21 +31,13 @@
 import javax.naming.Context;
 
 import junit.framework.Assert;
-import junit.framework.TestCase;
 
 import org.jboss.bootstrap.api.descriptor.BootstrapDescriptor;
-import org.jboss.bootstrap.api.descriptor.UrlBootstrapDescriptor;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
 import org.jboss.bootstrap.api.mc.server.MCServer;
 import org.jboss.bootstrap.api.mc.server.MCServerFactory;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.ejb3.embedded.api.EJBDeploymentException;
 import org.jboss.ejb3.embedded.api.JBossEJBContainer;
-import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.reloaded.api.ReloadedDescriptors;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.StringAsset;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.vdf.api.ShrinkWrapDeployer;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -76,7 +69,7 @@
    /**
     * {@link JBossEJBContainer} instance under test
     */
-   private JBossEJBContainer ejbContainer;
+   private JBossEJBContainerBase ejbContainer;
 
    //-------------------------------------------------------------------------------------||
    // Lifecycle --------------------------------------------------------------------------||
@@ -93,9 +86,6 @@
       final List<BootstrapDescriptor> descriptors = server.getConfiguration().getBootstrapDescriptors();
       descriptors.add(ReloadedDescriptors.getClassLoadingDescriptor());
       descriptors.add(ReloadedDescriptors.getVdfDescriptor());
-      descriptors.add(ReloadedDescriptors.getThreadsDescriptor());
-      descriptors.add(new UrlBootstrapDescriptor(Thread.currentThread().getContextClassLoader().getResource(
-            "shrinkwrap-deployer-jboss-beans.xml")));
 
       // Start
       server.start();
@@ -119,13 +109,11 @@
    @AfterClass
    public static void stopMc() throws Exception
    {
-      // Take out the ShrinkWrapDeployer
-      final KernelController conroller = server.getKernel().getController();
-      final ControllerContext context = server.getKernel().getController().getContextByClass(ShrinkWrapDeployer.class);
-      conroller.unregisterInstantiatedContext(context, ShrinkWrapDeployer.class);
-
       // Shutdown
-      server.stop();
+      if (server != null && server.getState().equals(LifecycleState.STARTED))
+      {
+         server.stop();
+      }
    }
 
    //-------------------------------------------------------------------------------------||
@@ -133,52 +121,6 @@
    //-------------------------------------------------------------------------------------||
 
    /**
-    * Ensures that ShrinkWrap deployments are delegated along as expected
-    */
-   @Test
-   public void shrinkWrapDeployment()
-   {
-      // Create a test archive which installs a POJO into MC
-      final JavaArchive archive = ShrinkWrap
-            .create(JavaArchive.class)
-            .addClasses(Pojo.class)
-            .addResource(
-                  new StringAsset(
-                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?><deployment xmlns=\"urn:jboss:bean-deployer:2.0\"><bean name=\"Pojo\" class=\""
-                              + Pojo.class.getName() + "\" /></deployment>"), "pojo-jboss-beans.xml");
-
-      // Deploy it
-      try
-      {
-         ejbContainer.deploy(archive);
-      }
-      catch (final EJBDeploymentException e)
-      {
-         TestCase.fail("Could not deploy " + archive.toString() + ": " + e);
-      }
-
-      // Ensure it was deployed
-      final KernelController controller = server.getKernel().getController();
-      final boolean installed = controller.getContextByClass(Pojo.class) != null;
-      Assert.assertTrue("Archive was not deployed", installed);
-
-      // Remove
-      try
-      {
-         ejbContainer.undeploy(archive);
-      }
-      catch (final EJBDeploymentException e)
-      {
-         TestCase.fail("Could not undeploy " + archive.toString() + ": " + e);
-      }
-
-      // Ensure it was removed
-      final boolean removed = controller.getContextByClass(Pojo.class) == null;
-      Assert.assertTrue("Archive was not undeployed", removed);
-
-   }
-
-   /**
     * Ensures we honor {@link JBossEJBContainer#getContext()}
     * @throws Exception
     */
@@ -186,10 +128,10 @@
    public void jndiContextFromEjbContainer() throws Exception
    {
 
-      // Install the naming server into MC
-      final JavaArchive namingServer = ShrinkWrap.create(JavaArchive.class, "namingServer.jar").addResource(
-            "naming-server-jboss-beans.xml");
-      ejbContainer.deploy(namingServer);
+      // Install the naming server into MC;
+      final File namingServerDeploymentFile = new File(Thread.currentThread().getContextClassLoader().getResource(
+            "naming-server-jboss-beans.xml").toURI());
+      ejbContainer.deploy(namingServerDeploymentFile.toURI().toURL());
 
       // Get a Context via the EJB Container
       final Context context = ejbContainer.getContext();
@@ -204,7 +146,7 @@
       Assert.assertSame("Object bound was not as expected", objectToBind, context.lookup(bindName));
 
       // Undeploy the JNDI server
-      ejbContainer.undeploy(namingServer);
+      ejbContainer.undeploy(namingServerDeploymentFile.toURI().toURL());
 
    }
 

Modified: projects/ejb3/components/embedded/trunk/impl-shrinkwrap/pom.xml
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-shrinkwrap/pom.xml	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/impl-shrinkwrap/pom.xml	2010-06-01 22:09:53 UTC (rev 105510)
@@ -36,12 +36,58 @@
   </properties>
 
   <dependencies>
+
+    <dependency>
+      <groupId>org.jboss.ejb3.embedded</groupId>
+      <artifactId>jboss-ejb3-embedded-impl-base</artifactId>
+      <version>${project.version}</version>
+    </dependency>
     
     <dependency>
+      <groupId>org.jboss.ejb3.embedded</groupId>
+      <artifactId>jboss-ejb3-embedded-api-shrinkwrap</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    
+    <dependency>
       <groupId>org.jboss.shrinkwrap</groupId>
-      <artifactId>shrinkwrap-api</artifactId>
+      <artifactId>shrinkwrap-api</artifactId> 
     </dependency>
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-impl-base</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-extension-vfs3</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-extension-vdf</artifactId>
+    </dependency>
 
+    <!-- JBoss Threads (needed for as long as we've got ShrinkWrapDeployer in use) -->
+    <dependency>
+      <groupId>org.jboss.threads</groupId>
+      <artifactId>jboss-threads</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.threads</groupId>
+      <artifactId>jboss-threads-metadata</artifactId>
+      <scope>test</scope>
+    </dependency>
     
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <scope>provided</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    
   </dependencies>
 </project>

Added: projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImpl.java
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImpl.java	                        (rev 0)
+++ projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/main/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImpl.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 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.ejb3.embedded.impl.shrinkwrap;
+
+import java.util.Arrays;
+
+import javax.naming.Context;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.ejb3.embedded.api.EJBDeploymentException;
+import org.jboss.ejb3.embedded.api.JBossEJBContainer;
+import org.jboss.ejb3.embedded.api.shrinkwrap.ShrinkWrapEJBContainer;
+import org.jboss.ejb3.embedded.spi.JBossEJBContainerProvider;
+import org.jboss.kernel.Kernel;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.vdf.api.ShrinkWrapDeployer;
+
+/**
+ * Adds ShrinkWrap deployment support (the {@link ShrinkWrapEJBContainer}
+ * contract) to a provided {@link JBossEJBContainerProvider} delegate.
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ShrinkWrapEJBContainerImpl implements ShrinkWrapEJBContainer
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Delegate to which we'll pass {@link JBossEJBContainer} operations
+    */
+   private final JBossEJBContainer delegate;
+
+   /**
+    * Deployer for ShrinkWrap {@link Archive} types
+    */
+   private final ShrinkWrapDeployer shrinkWrapDeployer;
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a new {@link ShrinkWrapEJBContainer} using the specified
+    * {@link JBossEJBContainerProvider} delegate.
+    *  
+    * @param delegate
+    * @throws IllegalArgumentException
+    */
+   public ShrinkWrapEJBContainerImpl(final JBossEJBContainerProvider delegate) throws IllegalArgumentException
+   {
+      // Precondition checks
+      if (delegate == null)
+      {
+         throw new IllegalArgumentException("EJB Container delegate must be specified");
+      }
+
+      // Get Kernel
+      final Kernel kernel = delegate.getMCServer().getKernel();
+
+      // Obtain ShrinkWrapDeployer
+      final ShrinkWrapDeployer shrinkWrapDeployer = (ShrinkWrapDeployer) kernel.getController().getContextByClass(
+            ShrinkWrapDeployer.class).getTarget();
+      assert shrinkWrapDeployer != null : "ShrinkWrapDeployer found in Kernel was null";
+
+      // Set
+      this.delegate = delegate;
+      this.shrinkWrapDeployer = shrinkWrapDeployer;
+
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.embedded.api.shrinkwrap.ShrinkWrapEJBContainer#deploy(org.jboss.shrinkwrap.api.Archive<?>[])
+    */
+   @Override
+   public void deploy(final Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException
+   {
+      // Precondition checks
+      if (archives == null)
+      {
+         throw new IllegalArgumentException("archives must be supplied");
+      }
+
+      // Deploy
+      try
+      {
+         shrinkWrapDeployer.deploy(archives);
+      }
+      catch (final DeploymentException e)
+      {
+         // Translate
+         throw EJBDeploymentException.newInstance("Could not deploy " + Arrays.asList(archives), e);
+      }
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.embedded.api.shrinkwrap.ShrinkWrapEJBContainer#undeploy(org.jboss.shrinkwrap.api.Archive<?>[])
+    */
+   @Override
+   public void undeploy(final Archive<?>... archives) throws EJBDeploymentException, IllegalArgumentException
+   {
+      // Precondition checks
+      if (archives == null)
+      {
+         throw new IllegalArgumentException("archives must be supplied");
+      }
+
+      // Undeploy
+      try
+      {
+         shrinkWrapDeployer.undeploy(archives);
+      }
+      catch (final DeploymentException e)
+      {
+         // Translate
+         throw EJBDeploymentException.newInstance("Could not undeploy " + Arrays.asList(archives), e);
+      }
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.embedded.api.JBossEJBContainer#close()
+    */
+   @Override
+   public void close()
+   {
+      delegate.close();
+
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.ejb3.embedded.api.JBossEJBContainer#getContext()
+    */
+   @Override
+   public Context getContext()
+   {
+      return delegate.getContext();
+   }
+}

Added: projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImplUnitTest.java
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImplUnitTest.java	                        (rev 0)
+++ projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/java/org/jboss/ejb3/embedded/impl/shrinkwrap/ShrinkWrapEJBContainerImplUnitTest.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -0,0 +1,225 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 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.ejb3.embedded.impl.shrinkwrap;
+
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.jboss.bootstrap.api.descriptor.BootstrapDescriptor;
+import org.jboss.bootstrap.api.descriptor.UrlBootstrapDescriptor;
+import org.jboss.bootstrap.api.lifecycle.LifecycleState;
+import org.jboss.bootstrap.api.mc.server.MCServer;
+import org.jboss.bootstrap.api.mc.server.MCServerFactory;
+import org.jboss.ejb3.embedded.api.EJBDeploymentException;
+import org.jboss.ejb3.embedded.api.shrinkwrap.ShrinkWrapEJBContainer;
+import org.jboss.ejb3.embedded.impl.base.JBossEJBContainerBase;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.reloaded.api.ReloadedDescriptors;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Ensures that the {@link ShrinkWrapEJBContainerImpl} 
+ * implementation is working as contracted by {@link ShrinkWrapEJBContainer}
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ShrinkWrapEJBContainerImplUnitTest
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * The underlying MC server
+    */
+   private static final MCServer server = MCServerFactory.createServer();
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * {@link ShrinkWrapEJBContainer} instance under test
+    */
+   private ShrinkWrapEJBContainer ejbContainer;
+
+   //-------------------------------------------------------------------------------------||
+   // Lifecycle --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Configures and starts the underlying MC server
+    */
+   @BeforeClass
+   public static void startMc() throws Exception
+   {
+
+      // Define the descriptors to use to start VDF
+      final List<BootstrapDescriptor> descriptors = server.getConfiguration().getBootstrapDescriptors();
+      descriptors.add(ReloadedDescriptors.getClassLoadingDescriptor());
+      descriptors.add(ReloadedDescriptors.getVdfDescriptor());
+      descriptors.add(ReloadedDescriptors.getThreadsDescriptor());
+      descriptors.add(new UrlBootstrapDescriptor(Thread.currentThread().getContextClassLoader().getResource(
+            "shrinkwrap-deployer-jboss-beans.xml")));
+
+      // Start
+      server.start();
+
+   }
+
+   /**
+    * Creates the EJB Container under test
+    */
+   @Before
+   public void createEJBContainer()
+   {
+      ejbContainer = new ShrinkWrapEJBContainerImpl(new TestJBossEJBContainer(new HashMap<Object, Object>(), server,
+            new String[]
+            {}));
+   }
+
+   /**
+    * Cleans up and shuts down MC
+    * @throws Exception
+    */
+   @AfterClass
+   public static void stopMc() throws Exception
+   {
+      // Shutdown
+      if (server != null && server.getState().equals(LifecycleState.STARTED))
+      {
+         server.stop();
+      }
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Ensures that ShrinkWrap deployments are delegated along as expected
+    */
+   @Test
+   public void shrinkWrapDeployment()
+   {
+      // Create a test archive which installs a POJO into MC
+      final JavaArchive archive = ShrinkWrap
+            .create(JavaArchive.class)
+            .addClasses(Pojo.class)
+            .addResource(
+                  new StringAsset(
+                        "<?xml version=\"1.0\" encoding=\"UTF-8\"?><deployment xmlns=\"urn:jboss:bean-deployer:2.0\"><bean name=\"Pojo\" class=\""
+                              + Pojo.class.getName() + "\" /></deployment>"), "pojo-jboss-beans.xml");
+
+      // Deploy it
+      try
+      {
+         ejbContainer.deploy(archive);
+      }
+      catch (final EJBDeploymentException e)
+      {
+         TestCase.fail("Could not deploy " + archive.toString() + ": " + e);
+      }
+
+      // Ensure it was deployed
+      final KernelController controller = server.getKernel().getController();
+      final boolean installed = controller.getContextByClass(Pojo.class) != null;
+      Assert.assertTrue("Archive was not deployed", installed);
+
+      // Remove
+      try
+      {
+         ejbContainer.undeploy(archive);
+      }
+      catch (final EJBDeploymentException e)
+      {
+         TestCase.fail("Could not undeploy " + archive.toString() + ": " + e);
+      }
+
+      // Ensure it was removed
+      final boolean removed = controller.getContextByClass(Pojo.class) == null;
+      Assert.assertTrue("Archive was not undeployed", removed);
+
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Functional Methods -----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   //-------------------------------------------------------------------------------------||
+   // Internal Helper Methods ------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Test concrete extension of the 
+    */
+   private static class TestJBossEJBContainer extends JBossEJBContainerBase
+   {
+
+      TestJBossEJBContainer(final Map<?, ?> properties, final MCServer server, final String[] modules)
+      {
+         super(properties, server, modules);
+      }
+
+      /**
+       * {@inheritDoc}
+       * @see javax.ejb.embeddable.EJBContainer#close()
+       */
+      @Override
+      public void close()
+      {
+         //NOOP
+      }
+
+   }
+
+   /**
+    * A simple test Pojo we'll check for installation
+    * 
+    * 
+    * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+    * @version $Revision: $
+    */
+   public static class Pojo implements Serializable
+   {
+
+      /**
+       * serialVersionUID
+       */
+      private static final long serialVersionUID = 1L;
+
+   }
+}

Added: projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/resources/log4j.xml
===================================================================
--- projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/resources/log4j.xml	                        (rev 0)
+++ projects/ejb3/components/embedded/trunk/impl-shrinkwrap/src/test/resources/log4j.xml	2010-06-01 22:09:53 UTC (rev 105510)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<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="Threshold" value="INFO"/>
+    <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>
+
+  <!-- ============================== -->
+  <!-- Append messages to the console -->
+  <!-- ============================== -->
+
+  <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+    <param name="Target" value="System.out"/>
+
+    <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"/>
+    </layout>
+  </appender>
+
+
+  <!-- ================ -->
+  <!-- Limit categories -->
+  <!-- ================ -->
+  
+  <category name="org.jboss">
+    <priority value="INFO"/>
+  </category>  
+  
+  <category name="org.jnp">
+    <priority value="INFO"/>
+  </category>
+  
+  <category name="org.jboss.ejb3.embedded">
+    <priority value="ALL"/>
+  </category>
+  
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <appender-ref ref="CONSOLE"/>
+    <appender-ref ref="FILE"/>
+  </root>
+  
+</log4j:configuration>

Modified: projects/ejb3/components/embedded/trunk/spi/pom.xml
===================================================================
--- projects/ejb3/components/embedded/trunk/spi/pom.xml	2010-06-01 21:56:40 UTC (rev 105509)
+++ projects/ejb3/components/embedded/trunk/spi/pom.xml	2010-06-01 22:09:53 UTC (rev 105510)
@@ -38,7 +38,7 @@
   <dependencies>
   
     <!-- 
-    Dependencies: org.jboss.ejb3 
+    Dependencies: org.jboss.ejb3.embedded
     -->
     <dependency>
       <groupId>${project.groupId}</groupId>
@@ -48,11 +48,11 @@
     
     
     <!-- 
-    Dependencies: External to EJB3 
+    Dependencies: External to EJB3 Embedded 
     -->
     <dependency>
-      <groupId>org.jboss.kernel</groupId>
-      <artifactId>jboss-kernel</artifactId>
+      <groupId>org.jboss.reloaded</groupId>
+      <artifactId>jboss-reloaded-vdf-bootstrap-minimal</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>

Added: projects/ejb3/components/embedded/trunk/spi/src/main/java/org/jboss/ejb3/embedded/spi/JBossEJBContainerProvider.java
===================================================================
--- projects/ejb3/components/embedded/trunk/spi/src/main/java/org/jboss/ejb3/embedded/spi/JBossEJBContainerProvider.java	                        (rev 0)
+++ projects/ejb3/components/embedded/trunk/spi/src/main/java/org/jboss/ejb3/embedded/spi/JBossEJBContainerProvider.java	2010-06-01 22:09:53 UTC (rev 105510)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 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.ejb3.embedded.spi;
+
+import org.jboss.bootstrap.api.mc.server.MCBasedServer;
+import org.jboss.bootstrap.api.mc.server.MCServer;
+import org.jboss.ejb3.embedded.api.JBossEJBContainer;
+
+/**
+ * Contract for implementations of {@link JBossEJBContainer}
+ * not visible to end-users 
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface JBossEJBContainerProvider extends JBossEJBContainer
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Exposes the underlying {@link MCServer}
+    * @return
+    */
+   MCBasedServer<?, ?> getMCServer();
+}




More information about the jboss-cvs-commits mailing list