[jboss-svn-commits] JBoss Common SVN: r4378 - in shrinkwrap/trunk: extension-vdf and 17 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon May 10 14:50:57 EDT 2010


Author: ALRubinger
Date: 2010-05-10 14:50:55 -0400 (Mon, 10 May 2010)
New Revision: 4378

Added:
   shrinkwrap/trunk/extension-vdf/
   shrinkwrap/trunk/extension-vdf/pom.xml
   shrinkwrap/trunk/extension-vdf/src/
   shrinkwrap/trunk/extension-vdf/src/main/
   shrinkwrap/trunk/extension-vdf/src/main/java/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/api/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/api/ShrinkWrapDeployer.java
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ArchiveDeployment.java
   shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ShrinkWrapDeployerImpl.java
   shrinkwrap/trunk/extension-vdf/src/main/resources/
   shrinkwrap/trunk/extension-vdf/src/main/resources/shrinkwrap-deployer-jboss-beans.xml
   shrinkwrap/trunk/extension-vdf/src/test/
   shrinkwrap/trunk/extension-vdf/src/test/java/
   shrinkwrap/trunk/extension-vdf/src/test/java/org/
   shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/
   shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/
   shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/
   shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/LifecyclePojo.java
   shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/ShrinkWrapDeployerTestCase.java
   shrinkwrap/trunk/extension-vdf/src/test/resources/
   shrinkwrap/trunk/extension-vdf/src/test/resources/log4j.xml
Modified:
   shrinkwrap/trunk/pom.xml
Log:
[SHRINKWRAP-167] Create a ShrinkWrapDeployer as bridge between SW and VDF


Property changes on: shrinkwrap/trunk/extension-vdf
___________________________________________________________________
Name: svn:ignore
   + target
.classpath
.settings
.project
bin


Added: shrinkwrap/trunk/extension-vdf/pom.xml
===================================================================
--- shrinkwrap/trunk/extension-vdf/pom.xml	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/pom.xml	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+  <!--
+  vi:ts=2:sw=2:expandtab:
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <!-- Parent -->
+  <parent>
+    <groupId>org.jboss.shrinkwrap</groupId>
+    <artifactId>shrinkwrap-build</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <relativePath>../build/pom.xml</relativePath>
+  </parent>
+
+  <!-- Model Version -->
+  <modelVersion>4.0.0</modelVersion>
+
+  <!-- Artifact Configuration -->
+  <artifactId>shrinkwrap-extension-vdf</artifactId>
+  <name>ShrinkWrap Extension JBoss Virtual Deployment Framework</name>
+  <description>ShrinkWrap Extension for the JBoss Virtual Deployment Framework</description>
+
+
+  <!-- Properties -->
+  <properties>
+  
+    <!-- Versioning -->
+    <version.org.jboss_jboss.vfs>3.0.0.CR5</version.org.jboss_jboss.vfs>
+    
+    <version.org.jboss.deployers_jboss.deployers.vfs>2.2.0.Alpha4</version.org.jboss.deployers_jboss.deployers.vfs>
+    <version.jboss.logging>2.2.0.CR1</version.jboss.logging>
+    <version.org.jboss.logmanager>1.2.0.CR1</version.org.jboss.logmanager>
+    <version.org.jboss.threads>2.0.0.CR4</version.org.jboss.threads>
+    <version.org.jboss.reloaded.vdf.bootstrap.minimal>0.1.2</version.org.jboss.reloaded.vdf.bootstrap.minimal>
+
+  </properties>
+
+  <!-- Dependencies -->
+  <dependencies>
+
+    <!-- 
+    org.jboss.shrinkwrap    
+     -->
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-api</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-impl-base</artifactId>
+      <version>${project.version}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.shrinkwrap</groupId>
+      <artifactId>shrinkwrap-extension-vfs3</artifactId>
+      <version>${project.version}</version>
+      <scope>provided</scope>
+    </dependency>
+
+    <!-- 
+    External Projects
+     -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>${version.org.jboss_jboss.vfs}</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.deployers</groupId>
+      <artifactId>jboss-deployers-vfs</artifactId>
+      <version>${version.org.jboss.deployers_jboss.deployers.vfs}</version>
+      <scope>provided</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+      <version>${version.jboss.logging}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-jdk</artifactId>
+      <version>${version.jboss.logging}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logmanager</groupId>
+      <artifactId>jboss-logmanager</artifactId>
+      <version>${version.org.jboss.logmanager}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-logmanager</artifactId>
+      <version>${version.jboss.logging}</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <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.reloaded</groupId>
+      <artifactId>jboss-reloaded-vdf-bootstrap-minimal</artifactId>
+      <version>${version.org.jboss.reloaded.vdf.bootstrap.minimal}</version>
+      <scope>test</scope>
+    </dependency>
+    
+
+  </dependencies>
+
+  <!-- Build Configuration -->
+  <build>
+  
+    <plugins>
+
+    </plugins>
+    
+  </build>
+  
+</project>
+

Added: shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/api/ShrinkWrapDeployer.java
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/api/ShrinkWrapDeployer.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/api/ShrinkWrapDeployer.java	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,62 @@
+/*
+ * 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.shrinkwrap.vdf.api;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * Deployer for ShrinkWrap {@link Archive} types.  End-user
+ * view to adapt archives directly into the Virtual Deployment
+ * Framework.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public interface ShrinkWrapDeployer
+{
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Deploys the specified archives into the Virtual Deployment Framework
+    * as an atomic operation.  
+    * 
+    * @param archives The archives to deploy
+    * @throws IllegalArgumentException If the archives are not specified (null)
+    * @throws DeploymentException If an error occurred in deployment
+    */
+   void deploy(Archive<?>... archives) throws IllegalArgumentException, DeploymentException;
+
+   /**
+    * Undeploys the specified archives from the Virtual Deployment Framework.  Each
+    * archive must have been previously deployed in via this {@link ShrinkWrapDeployer}
+    * instance, else it will be ignored and logged as a warning.
+    * 
+    * @param archives The archives to undeploy
+    * @throws IllegalArgumentException If the archives are not specified
+    * @throws DeploymentException If an error occurred during undeployment
+    */
+   void undeploy(Archive<?>... archives) throws IllegalArgumentException, DeploymentException;
+
+}

Added: shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ArchiveDeployment.java
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ArchiveDeployment.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ArchiveDeployment.java	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,249 @@
+/*
+ * 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.shrinkwrap.vdf.impl;
+
+import java.io.Closeable;
+import java.io.IOException;
+import java.util.Set;
+import java.util.UUID;
+
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.attachments.Attachments;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.vfs3.ArchiveFileSystem;
+import org.jboss.vfs.TempDir;
+import org.jboss.vfs.TempFileProvider;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+
+/**
+ * {@link Deployment} implementation allowing an {@link Archive}
+ * to be handed off directly to the Virtual Deployment Framework.
+ * Clients are responsible, after undeployment has completed, to call 
+ * {@link Closeable#close()} upon the return value of
+ * {@link ArchiveDeployment#getHandle()}.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class ArchiveDeployment implements VFSDeployment
+{
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * serialVersionUID
+    */
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * The archive to be deployed
+    */
+   private final Archive<?> archive;
+
+   /**
+    * The VDF deployment view to be passed to {@link MainDeployer} 
+    */
+   private final Deployment deployment;
+
+   /**
+    * The VFS handle which may be closed on undeployment
+    */
+   private final Closeable handle;
+
+   /**
+    * VFS view of the {@link Archive}
+    */
+   private final VirtualFile file;
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a new {@link ArchiveDeployment} by mounting the specified {@link Archive} into
+    * an {@link ArchiveFileSystem} backed by the specified {@link TempFileProvider} 
+    * @param archive The archive to be represented as a {@link Deployment}
+    * @param tempFileProvider The backing temp file provider for the archive to be flushed 
+    *   to real disk if necessary
+    */
+   ArchiveDeployment(final Archive<?> archive, final TempFileProvider tempFileProvider)
+   {
+      // Precondition checks
+      assert archive != null : "archive must be specified";
+      assert tempFileProvider != null : "provider must be specified";
+
+      // Create a VFS VirtualFile and mount it
+      final String archiveName = archive.getName();
+      final TempDir tempDir;
+      try
+      {
+         tempDir = tempFileProvider.createTempDir(archiveName);
+      }
+      catch (final IOException ioe)
+      {
+         throw new RuntimeException("Could not create temp directory to back " + archive.toString(), ioe);
+      }
+      final VirtualFile virtualFile = VFS.getChild(UUID.randomUUID().toString()).getChild(archiveName);
+
+      // Set
+      this.file = virtualFile;
+      this.archive = archive;
+      try
+      {
+         this.handle = VFS.mount(virtualFile, new ArchiveFileSystem(archive, tempDir));
+      }
+      catch (final IOException ioe)
+      {
+         throw new RuntimeException("Could not mount for deployment: " + archive.toString(), ioe);
+      }
+      this.deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(virtualFile);
+
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Accessors --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * @return the archive
+    */
+   Archive<?> getArchive()
+   {
+      return archive;
+   }
+
+   /**
+    * @return the deployment
+    */
+   Deployment getDeployment()
+   {
+      return deployment;
+   }
+
+   /**
+    * @return the handle
+    */
+   Closeable getHandle()
+   {
+      return handle;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /*
+    * Everything below this line delegates to the real deployment
+    */
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.client.spi.Deployment#getSimpleName()
+    */
+   @Override
+   public String getSimpleName()
+   {
+      return this.getDeployment().getSimpleName();
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.client.spi.Deployment#getName()
+    */
+   @Override
+   public String getName()
+   {
+      return this.getDeployment().getName();
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.client.spi.Deployment#getTypes()
+    */
+   @Override
+   @SuppressWarnings("deprecation")
+   public Set<String> getTypes()
+   {
+      return this.getDeployment().getTypes();
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.client.spi.Deployment#setTypes(java.util.Set)
+    */
+   @Override
+   @SuppressWarnings("deprecation")
+   public void setTypes(final Set<String> types)
+   {
+      this.getDeployment().setTypes(types);
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.spi.attachments.PredeterminedManagedObjectAttachments#getPredeterminedManagedObjects()
+    */
+   @Override
+   public Attachments getPredeterminedManagedObjects()
+   {
+      return this.getDeployment().getPredeterminedManagedObjects();
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.spi.attachments.PredeterminedManagedObjectAttachments#setPredeterminedManagedObjects(org.jboss.deployers.spi.attachments.Attachments)
+    */
+   @Override
+   public void setPredeterminedManagedObjects(final Attachments predetermined)
+   {
+      this.getDeployment().setPredeterminedManagedObjects(predetermined);
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.deployers.vfs.spi.client.VFSDeployment#getRoot()
+    */
+   @Override
+   public VirtualFile getRoot()
+   {
+      return file;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Overridden Implementations ---------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+   
+   /**
+    * {@inheritDoc}
+    * @see java.lang.Object#toString()
+    */
+   @Override
+   public String toString()
+   {
+      return "ArchiveDeployment [archive=" + archive + ", " + VirtualFile.class.getSimpleName() + "=" + file.toString()
+            + "]";
+   }
+}

Added: shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ShrinkWrapDeployerImpl.java
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ShrinkWrapDeployerImpl.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/main/java/org/jboss/shrinkwrap/vdf/impl/ShrinkWrapDeployerImpl.java	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,332 @@
+/*
+ * 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.shrinkwrap.vdf.impl;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.beans.metadata.api.annotations.Inject;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.logging.Logger;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.vdf.api.ShrinkWrapDeployer;
+import org.jboss.shrinkwrap.vfs3.ArchiveFileSystem;
+import org.jboss.vfs.TempFileProvider;
+
+/**
+ * Base implementation of a {@link ShrinkWrapDeployer}.  Handles
+ * mounting/unmounting of {@link Archive}s into VFS using 
+ * the {@link ArchiveFileSystem}.  {@link Archive}s are then represented
+ * as {@link VFSDeployment}s and passed into the {@link MainDeployer}.
+ * Thread-safe; deploy and undeploy will block and service one client at a time.
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public final class ShrinkWrapDeployerImpl implements ShrinkWrapDeployer
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(ShrinkWrapDeployerImpl.class);
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Delegate to handle the real deployment.
+    */
+   private final MainDeployer deployer;
+
+   /**
+    * Temporary file provider with which archives will be mounted
+    * before deployment
+    */
+   private final TempFileProvider tempFileProvider;
+
+   /**
+    * Mapping of all archives deployed via this {@link ShrinkWrapDeployer} instance.  Must
+    * be guarded by "this" alongside deploy/undeploy operations.
+    */
+   private final Map<Archive<?>, ArchiveDeployment> deployments = new HashMap<Archive<?>, ArchiveDeployment>();
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a new {@link ShrinkWrapDeployerImpl} instance.
+    * 
+    * @param deployer The delegate deployer to handle 
+    */
+   public ShrinkWrapDeployerImpl(@Inject final MainDeployer deployer, @Inject final TempFileProvider tempFileProvider)
+   {
+      // Precondition checks
+      if (deployer == null)
+      {
+         throw new IllegalArgumentException("deployer must be specified");
+      }
+      if (tempFileProvider == null)
+      {
+         throw new IllegalArgumentException("tempFileProvider must be specified");
+      }
+
+      // Set
+      this.deployer = deployer;
+      this.tempFileProvider = tempFileProvider;
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Required Implementations -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.reloaded.api.ShrinkWrapDeployer#deploy(org.jboss.shrinkwrap.api.Archive<?>[])
+    */
+   @Override
+   public void deploy(final Archive<?>... archives) throws IllegalArgumentException, DeploymentException
+   {
+      // Precondition checks
+      if (archives == null)
+      {
+         throw new IllegalArgumentException("Archives must be specified (even if empty)");
+      }
+
+      // Create ArchiveDeployments from the Archives
+      final Collection<ArchiveDeployment> newDeployments = new ArrayList<ArchiveDeployment>();
+      for (final Archive<?> archive : archives)
+      {
+         newDeployments.add(new ArchiveDeployment(archive, tempFileProvider));
+      }
+
+      // Deployment must be atomic
+      synchronized (this)
+      {
+         // Get the MainDeployer
+         final MainDeployer deployer = this.deployer;
+
+         // Init the deployments to add
+         final Collection<ArchiveDeployment> deploymentsToAdd = new ArrayList<ArchiveDeployment>(archives.length);
+
+         // For all new deployments
+         for (final ArchiveDeployment deployment : newDeployments)
+         {
+            // Check that we haven't deployed this archive already
+            final Archive<?> currentArchive = deployment.getArchive();
+            if (deployments.containsKey(currentArchive))
+            {
+               // Log a warning and unmount this sucker
+               log.warnf("Ignoring request to deploy already-deployed archive: %s", currentArchive);
+               try
+               {
+                  deployment.getHandle().close();
+               }
+               catch (final IOException e)
+               {
+                  log.warnf(e, "Could not close handle for mounted archive %s", currentArchive);
+               }
+            }
+
+            // Add to the MainDeployer
+            try
+            {
+               deployer.addDeployment(deployment);
+            }
+            catch (final DeploymentException de)
+            {
+               // Some error occurred while adding; revert out all the previously-processed deployments and report the error
+               log.warnf(de, "Error in adding deployment for archive %s; reverting out the previous deployments",
+                     currentArchive);
+               removeDeployments(deploymentsToAdd);
+               throw de;
+            }
+            if (log.isTraceEnabled())
+            {
+               log.tracef("Adding archive for deployment: %s", currentArchive);
+            }
+            deploymentsToAdd.add(deployment);
+
+         }
+
+         // Process and check the MainDeployer
+         deployer.process();
+         try
+         {
+            deployer.checkComplete();
+         }
+         catch (final DeploymentException de)
+         {
+            // Some error occurred while processing and checking; revert out all the previously-processed deployments and report the error
+            log.warn("Error in processing deployments; reverting all archives requested for deployment", de);
+            removeDeployments(deploymentsToAdd);
+            throw de;
+         }
+
+         // Success; now formally mark all deployments as deployed
+         for (final ArchiveDeployment deploymentAdded : deploymentsToAdd)
+         {
+            this.deployments.put(deploymentAdded.getArchive(), deploymentAdded);
+         }
+         if (log.isDebugEnabled())
+         {
+            log.debugf("Deployed: %s", deploymentsToAdd);
+         }
+      }
+
+   }
+
+   /**
+    * {@inheritDoc}
+    * @see org.jboss.reloaded.api.ShrinkWrapDeployer#undeploy(org.jboss.shrinkwrap.api.Archive<?>[])
+    */
+   @Override
+   public void undeploy(final Archive<?>... archives) throws IllegalArgumentException, DeploymentException
+   {
+      // Precondition checks
+      if (archives == null)
+      {
+         throw new IllegalArgumentException("Archives must be specified (even if empty)");
+      }
+
+      // Undeployment must be atomic
+      synchronized (this)
+      {
+         // Init a Collection of deployments to remove
+         final Collection<ArchiveDeployment> deploymentsToRemove = new ArrayList<ArchiveDeployment>(archives.length);
+
+         // Get the underlying deployments as keys from the archive
+         for (final Archive<?> archive : archives)
+         {
+
+            final ArchiveDeployment deployment = this.deployments.get(archive);
+            if (deployment == null)
+            {
+               log.warnf("No deployment has been made for archive %s; ignoring", archive.toString());
+            }
+            else
+            {
+               deploymentsToRemove.add(deployment);
+            }
+         }
+
+         // Remove all
+         this.removeDeployments(deploymentsToRemove);
+      }
+
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Internal Helper Methods -----------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Makes a best-effort at removing all specified {@link Deployment}s from
+    * the {@link MainDeployer}, throwing a {@link DeploymentException} if one is 
+    * encountered during final check of the deployer.  Unconditionally attempts to 
+    * close all associated {@link ArchiveDeployment#getHandle()}s.  MUST be called from within
+    * a synchronized block using "this" as monitor.
+    * @param deployments
+    */
+   private void removeDeployments(final Collection<ArchiveDeployment> deployments) throws DeploymentException
+   {
+      // Precondition checks
+      assert deployments != null : "deployments must not be null";
+
+      // Get the MainDeployer
+      final MainDeployer deployer = this.deployer;
+
+      // For all deployments
+      for (final ArchiveDeployment deployment : deployments)
+      {
+         try
+         {
+            // Remove from the deployer
+            deployer.removeDeployment(deployment);
+         }
+         catch (final DeploymentException de)
+         {
+            // Just log this removal failure
+            log.warnf(de, "Could not remove deployment %s", deployment);
+         }
+      }
+
+      // Mark a reference to cache an exception if we get one (to be rethrown)
+      DeploymentException cachedException = null;
+
+      // Process and check the deployer
+      deployer.process();
+      try
+      {
+         deployer.checkComplete();
+      }
+      catch (final DeploymentException de)
+      {
+
+         log.warn("Problem in Main Deployer while removing pending deployments", de);
+         // We can overwrite the exception cached above because this 
+         // is likely to be more important
+         cachedException = de;
+      }
+
+      // For all deployments
+      for (final ArchiveDeployment deployment : deployments)
+      {
+         try
+         {
+            // Close up
+            deployment.getHandle().close();
+         }
+         catch (final IOException e)
+         {
+            // Don't bother WARNing this, but make a record in DEBUG
+            if (log.isDebugEnabled())
+            {
+               log.debugf(e, "Could not close the mounted %s", deployment.getArchive());
+            }
+         }
+
+         // Mark removed
+         this.deployments.remove(deployment.getArchive());
+      }
+
+      // Throw a DeploymentException if we got one
+      if (cachedException != null)
+      {
+         throw cachedException;
+      }
+
+   }
+
+}

Added: shrinkwrap/trunk/extension-vdf/src/main/resources/shrinkwrap-deployer-jboss-beans.xml
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/main/resources/shrinkwrap-deployer-jboss-beans.xml	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/main/resources/shrinkwrap-deployer-jboss-beans.xml	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- 
+
+  Deployment descriptor for the ShrinkWrapDeployer and its dependencies 
+
+ -->
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
+  xmlns="urn:jboss:bean-deployer:2.0">
+  
+  <!-- ShrinkWrapDeployer -->
+  <bean name="ShrinkWrapDeployer" class="org.jboss.shrinkwrap.vdf.impl.ShrinkWrapDeployerImpl">
+    <constructor>
+      <parameter class="org.jboss.deployers.client.spi.main.MainDeployer">
+        <inject />
+      </parameter>
+      <parameter class="org.jboss.vfs.TempFileProvider">
+        <inject />
+      </parameter>
+    </constructor>
+  </bean>
+  
+  <!-- Deployment configuration for a VFS TempFileProvider 
+
+  <threads xmlns="urn:jboss:threads:2.0"> 
+    <thread-factory name="org.jboss.reloaded.TempFileThreadFactory"/>
+    <scheduled-thread-pool-executor name="org.jboss.reloaded.TempFileExecutorService">
+        <max-threads count="1" per-cpu="1"/>
+        <thread-factory name="org.jboss.reloaded.TempFileThreadFactory"/>
+    </scheduled-thread-pool-executor>
+  </threads>
+  
+  Currently fails with:
+  
+  org.jboss.joinpoint.spi.JoinpointException: Constructor not found 
+  org.jboss.threads.QueuelessExecutor[int, java.util.concurrent.ThreadFactory] in 
+  [ReflectConstructorInfoImpl at 11afd9cc{[ReflectClassInfoImpl at 3003e926{name=java.util.concurrent.ThreadFactory}, 
+  ReflectClassInfoImpl at 50bfd66a{name=org.jboss.threads.DirectExecutor}, 
+  ReflectClassInfoImpl at 6295f290{name=java.util.concurrent.Executor}, long]}]
+  
+  FIXME:  Example on http://community.jboss.org/wiki/ThreadPoolConfiguration might need to be updated
+  Ask DML
+  
+  -->
+  
+  <!--
+    Define the Executor, but this should really be done in threads.xsd
+    format above
+    TODO Remove this when the above works
+  -->
+  <bean name="org.jboss.shrinkwrap.TempFileExecutorService" class="org.jboss.threads.JBossScheduledThreadPoolExecutor">
+    <constructor>
+      <parameter>1</parameter>
+    </constructor>
+  </bean> 
+
+  <bean name="org.jboss.shrinkwrap.TempFileProvider" class="org.jboss.vfs.TempFileProvider">
+    <constructor factoryClass="org.jboss.vfs.TempFileProvider"
+      factoryMethod="create">
+      <parameter>shrinkwrap-</parameter>
+      <parameter>
+        <inject bean="org.jboss.shrinkwrap.TempFileExecutorService" />
+      </parameter>
+    </constructor>
+  </bean>
+ 
+ </deployment>
\ No newline at end of file

Added: shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/LifecyclePojo.java
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/LifecyclePojo.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/LifecyclePojo.java	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,76 @@
+/*
+ * 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.shrinkwrap.vdf;
+
+import org.jboss.beans.metadata.api.annotations.Start;
+import org.jboss.beans.metadata.api.annotations.Stop;
+
+/**
+ * Simple POJO with lifecycle operations to set state
+ * in globally-accessible fashion for testing
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class LifecyclePojo
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Notes the state of this POJO
+    */
+   enum State {
+      STARTED, STOPPED;
+   }
+
+   /**
+    * State flag so the test can see that we've been deployed
+    */
+   static State state = State.STOPPED;
+
+   //-------------------------------------------------------------------------------------||
+   // Lifecycle Methods ------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Lifecycle start callback
+    * @throws Exception
+    */
+   @Start
+   public void start() throws Exception
+   {
+      state = State.STARTED;
+   }
+
+   /**
+    * Lifecycle stop callback 
+    * @throws Exception
+    */
+   @Stop
+   public void stop() throws Exception
+   {
+      state = State.STOPPED;
+   }
+}

Added: shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/ShrinkWrapDeployerTestCase.java
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/ShrinkWrapDeployerTestCase.java	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/test/java/org/jboss/shrinkwrap/vdf/ShrinkWrapDeployerTestCase.java	2010-05-10 18:50:55 UTC (rev 4378)
@@ -0,0 +1,238 @@
+package org.jboss.shrinkwrap.vdf;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.List;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.jboss.bootstrap.api.descriptor.BootstrapDescriptor;
+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.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.logging.Logger;
+import org.jboss.reloaded.api.ReloadedDescriptors;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ArchivePaths;
+import org.jboss.shrinkwrap.api.Asset;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.vdf.api.ShrinkWrapDeployer;
+import org.jboss.vfs.VFS;
+import org.jboss.vfs.VirtualFile;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+/**
+ * Ensures that the {@link ShrinkWrapDeployer} supports deployment
+ * and undeployment of ShrinkWrap {@link Archive}s.
+ * 
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+public class ShrinkWrapDeployerTestCase
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(ShrinkWrapDeployerTestCase.class);
+
+   /**
+    * MC bean name of the {@link ShrinkWrapDeployer}
+    */
+   private static final String NAME_MC_SHRINKWRAP_DEPLOYER = "ShrinkWrapDeployer";
+
+   /**
+    * Name of a ShrinkWrap {@link Archive} we'll deploy
+    */
+   private static final String NAME_ARCHIVE = "testDeployment.jar";
+
+   /**
+    * Name of the system property signaling JBossXB to ignore order
+    */
+   private static final String NAME_SYSPROP_JBOSSXB_IGNORE_ORDER = "xb.builder.useUnorderedSequence";
+
+   /**
+    * Value to set for JBossXB ordering
+    */
+   private static final String VALUE_SYSPROP_JBOSSXB_IGNORE_ORDER = "true";
+
+   /**
+    * Name of the Deployment XML to install the ShrinkWrapDeployer
+    */
+   private static final String FILENAME_SHRINKWRAP_DEPLOYER_XML = "../classes/shrinkwrap-deployer-jboss-beans.xml";
+
+   //-------------------------------------------------------------------------------------||
+   // Instance Members -------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * The Server
+    */
+   private MCServer server;
+
+   /**
+    * The Deployment where we install ShrinkWrapDeployer
+    */
+   private Deployment shrinkWrapDeployerDeployment;
+
+   /**
+    * MainDeployer used to install the ShrinkWrapDeployer
+    */
+   private MainDeployer mainDeployer;
+
+   //-------------------------------------------------------------------------------------||
+   // Lifecycle --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Setup JBossXB
+    * TODO @see comments below so that this step is not necessary
+    */
+   @BeforeClass
+   public static void setupJBossXb()
+   {
+      AccessController.doPrivileged(new PrivilegedAction<Void>()
+      {
+         public Void run()
+         {
+            // Must use unordered sequence else JBossXB will explode
+            //TODO Define a proper vfs.xml which is properly ordered
+            System.setProperty(NAME_SYSPROP_JBOSSXB_IGNORE_ORDER, VALUE_SYSPROP_JBOSSXB_IGNORE_ORDER);
+            return null;
+         }
+      });
+   }
+
+   /**
+    * Starts the server before each test
+    * @throws Exception
+    */
+   @Before
+   public void startServerAndInstallCachingDeployer() throws Throwable
+   {
+      // Create a server
+      final MCServer mcServer = MCServerFactory.createServer();
+      this.server = mcServer;
+
+      // Configure it
+      final List<BootstrapDescriptor> descriptors = server.getConfiguration().getBootstrapDescriptors();
+      descriptors.add(ReloadedDescriptors.getClassLoadingDescriptor());
+      descriptors.add(ReloadedDescriptors.getVdfDescriptor());
+
+      // Start
+      long before = System.currentTimeMillis();
+      server.start();
+      long after = System.currentTimeMillis();
+      long total = after - before;
+      log.info("Boot took: " + total + "ms");
+
+      // Install the ShrinkWrapDeployer
+      final URL base = this.getClass().getProtectionDomain().getCodeSource().getLocation();
+      final URL shrinkWrapDeployerXml = new URL(base, FILENAME_SHRINKWRAP_DEPLOYER_XML);
+      log.info(shrinkWrapDeployerXml);
+      final VirtualFile shrinkWrapDeployerFile = VFS.getChild(shrinkWrapDeployerXml);
+      final Deployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(shrinkWrapDeployerFile);
+      this.shrinkWrapDeployerDeployment = deployment;
+      final MainDeployer mainDeployer = (MainDeployer) server.getKernel().getController().getContextByClass(
+            MainDeployer.class).getTarget();
+      mainDeployer.addDeployment(deployment);
+      mainDeployer.process();
+      mainDeployer.checkComplete();
+      this.mainDeployer = mainDeployer;
+   }
+
+   /**
+    * Stops the server after each test
+    * @throws Exception
+    */
+   @After
+   public void stopServer() throws Exception
+   {
+      if (server != null && server.getState().equals(LifecycleState.STARTED))
+      {
+         // Remove the SW deployer
+         mainDeployer.removeDeployment(shrinkWrapDeployerDeployment);
+         mainDeployer.process();
+         mainDeployer.checkComplete();
+
+         // Stop the server
+         server.stop();
+      }
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Tests ------------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Ensures that a ShrinkWrap {@link Archive} may be directly deployed into
+    * the {@link ShrinkWrapDeployer}
+    */
+   @Test
+   public void testShrinkWrapDeployment() throws Throwable
+   {
+      // Get the KernelController
+      final KernelController controller = server.getKernel().getController();
+
+      // Get the ShrinkWrapDeployer (should have been installed via the lifecycle)
+      final ShrinkWrapDeployer shrinkwrapDeployer = (ShrinkWrapDeployer) controller.getInstalledContext(
+            NAME_MC_SHRINKWRAP_DEPLOYER).getTarget();
+      TestCase.assertNotNull(ShrinkWrapDeployer.class.getName() + " instance was not installed into MC",
+            shrinkwrapDeployer);
+
+      // Ensure preconditions (state STOPPED)
+      LifecyclePojo.State currentState = LifecyclePojo.state;
+      log.info("Current State of Lifecycle POJO: " + currentState);
+      Assert.assertEquals("Lifecycle POJO state should be stopped before deployment", LifecyclePojo.State.STOPPED,
+            currentState);
+
+      // Construct a test JAR to install the Lifecycle POJO
+      final Asset deploymentXmlAsset = new Asset()
+      {
+
+         @Override
+         public InputStream openStream()
+         {
+            return new ByteArrayInputStream(new String(
+                  "<deployment xmlns=\"urn:jboss:bean-deployer:2.0\"><bean name=\"LifecyclePojo\" class=\""
+                        + LifecyclePojo.class.getName() + "\" /></deployment>").getBytes());
+         }
+      };
+      final JavaArchive testJar = ShrinkWrap.create(NAME_ARCHIVE, JavaArchive.class).addClass(LifecyclePojo.class).add(
+            deploymentXmlAsset, ArchivePaths.create("pojo-jboss-beans.xml"));
+
+      // Deploy the test JAR
+      shrinkwrapDeployer.deploy(testJar);
+
+      // Ensure deployed
+      currentState = LifecyclePojo.state;
+      log.info("Current State of Lifecycle POJO: " + currentState);
+      Assert.assertEquals("Lifecycle POJO state should be started after deployment", LifecyclePojo.State.STARTED,
+            currentState);
+
+      // Undeploy
+      shrinkwrapDeployer.undeploy(testJar);
+
+      // Ensure undeployed
+      currentState = LifecyclePojo.state;
+      log.info("Current State of Lifecycle POJO: " + currentState);
+      Assert.assertEquals("Lifecycle POJO state should be stopped after undeployment", LifecyclePojo.State.STOPPED,
+            LifecyclePojo.state);
+   }
+}

Added: shrinkwrap/trunk/extension-vdf/src/test/resources/log4j.xml
===================================================================
--- shrinkwrap/trunk/extension-vdf/src/test/resources/log4j.xml	                        (rev 0)
+++ shrinkwrap/trunk/extension-vdf/src/test/resources/log4j.xml	2010-05-10 18:50:55 UTC (rev 4378)
@@ -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.shrinkwrap">
+    <priority value="ALL"/>
+  </category>
+  
+  <!-- ======================= -->
+  <!-- Setup the Root category -->
+  <!-- ======================= -->
+
+  <root>
+    <appender-ref ref="CONSOLE"/>
+    <appender-ref ref="FILE"/>
+  </root>
+  
+</log4j:configuration>

Modified: shrinkwrap/trunk/pom.xml
===================================================================
--- shrinkwrap/trunk/pom.xml	2010-05-09 21:49:03 UTC (rev 4377)
+++ shrinkwrap/trunk/pom.xml	2010-05-10 18:50:55 UTC (rev 4378)
@@ -73,6 +73,7 @@
     <module>extension-jetty</module>
     <module>extension-openejb</module>
     <module>extension-vfs3</module>
+    <module>extension-vdf</module>
   </modules>
 
 </project>



More information about the jboss-svn-commits mailing list