[jboss-svn-commits] JBoss Common SVN: r3600 - in shrinkwrap/trunk: api/src/main/java/org/jboss/shrinkwrap/api/spec and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Oct 14 11:22:41 EDT 2009


Author: ALRubinger
Date: 2009-10-14 11:22:40 -0400 (Wed, 14 Oct 2009)
New Revision: 3600

Added:
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/EnterpriseArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/FactoryUtil.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/JavaArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ResourceAdapterArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/WebArchiveFactory.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/EnterpriseArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/JavaArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/ResourceAdapterArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/WebArchiveFactoryImpl.java
Removed:
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/EnterpriseArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/FactoryUtil.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/JavaArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ResourceAdapterArchiveFactory.java
   shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/WebArchiveFactory.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/EnterpriseArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/JavaArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ResourceAdapterArchiveFactoryImpl.java
   shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/WebArchiveFactoryImpl.java
Modified:
   shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/EnterpriseArchiveFactoryTestCase.java
   shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/JavaArchiveFactoryTestCase.java
   shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/ResourceAdapterArchiveFactoryTestCase.java
   shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/WebArchiveFactoryTestCase.java
Log:
[SHRINKWRAP-43] Move factories for spec types to the spec package

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ArchiveFactory.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ArchiveFactory.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-/**
- * ArchiveFactory
- * 
- * Template Factory used to create {@link Archive} instances. 
- * 
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-abstract class ArchiveFactory<T extends Archive<T>>
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Methods ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Create an instance of an ArchiveFactory implementation
-    *  
-    * @return ArchiveFactory instance
-    */
-   protected synchronized static <T extends Archive<T>, F extends ArchiveFactory<T>> F createInstance(
-         Class<F> factoryBaseType, String fqFactoryName)
-   {
-      try
-      {
-         // Create the instance
-         F instance = FactoryUtil.createInstance(fqFactoryName, factoryBaseType);
-
-         // Return the instance
-         return instance;
-      }
-      catch (Exception e)
-      {
-         throw new IllegalStateException("Make sure you have the impl classes on your runtime classpath", e);
-      }
-   }
-
-   //-------------------------------------------------------------------------------------||
-   // Contracts --------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Template create method for concrete implementations  
-    * 
-    * @param archiveName
-    * @return Archive instance
-    */
-   protected abstract T doCreate(String archiveName);
-}

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/EnterpriseArchiveFactory.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/EnterpriseArchiveFactory.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/EnterpriseArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
-
-/**
- * EnterpriseArchiveFactory
- * 
- * Factory used to create {@link EnterpriseArchive} instances. 
- * 
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public abstract class EnterpriseArchiveFactory extends ArchiveFactory<EnterpriseArchive>
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Implementation type as a FQN to avoid direct compile-time dependency
-    */
-   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.EnterpriseArchiveFactoryImpl";
-
-   /**
-    * Instance of EnterpriseArchiveFactory implementation
-    */
-   private static EnterpriseArchiveFactory instance;
-
-   //-------------------------------------------------------------------------------------||
-   // Class Methods ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Creates a {@link EnterpriseArchive} instance with the provided name.
-    * 
-    * @param archiveName
-    * @return EnterpriseArchive instance 
-    * @throws IllegalArgumentException if the archiveName is not present
-    */
-   public static EnterpriseArchive create(String archiveName)
-   {
-      return getInstance().doCreate(archiveName);
-   }
-
-   /**
-    * Return instance of the EnterpriseArchiveFactory
-    * 
-    * @return
-    */
-   private synchronized static EnterpriseArchiveFactory getInstance()
-   {
-      if (instance == null)
-      {
-         instance = createInstance(EnterpriseArchiveFactory.class, IMPL_TYPE);
-      }
-      return instance;
-   }
-
-}

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/FactoryUtil.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/FactoryUtil.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/FactoryUtil.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.logging.Logger;
-
-/**
- * FactoryUtil
- * 
- * Package-private factory utilities 
- *
- * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
- * @version $Revision: $
- */
-class FactoryUtil
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Logger
-    */
-   private static final Logger log = Logger.getLogger(FactoryUtil.class.getName());
-
-   //-------------------------------------------------------------------------------------||
-   // Constructor ------------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Prohibit instantiation
-    */
-   private FactoryUtil()
-   {
-      throw new UnsupportedOperationException("No instances should be created; stateless utility class");
-   }
-
-   //-------------------------------------------------------------------------------------||
-   // Functional Methods -----------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Create an instance of the Class with the specified FQN, of the expected
-    * type
-    * 
-    * @throws IllegalArgumentException If the specified type is not assignable to the instance
-    *       of the class created from the specified class name, or if either argument is not
-    *       supplied
-    */
-   static <T> T createInstance(final String className, final Class<T> type) throws IllegalArgumentException
-   {
-      // Precondition checks
-      if (className == null || className.length() == 0)
-      {
-         throw new IllegalArgumentException("className must be specified");
-      }
-      if (type == null)
-      {
-         throw new IllegalArgumentException("type must be specified");
-      }
-
-      return AccessController.doPrivileged(new PrivilegedAction<T>()
-      {
-         public T run()
-         {
-            try
-            {
-               final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
-               final Class<?> clazz = Class.forName(className, false, classLoader);
-               final Object obj = clazz.newInstance();
-               try
-               {
-                  return type.cast(obj);
-               }
-               catch (final ClassCastException cee)
-               {
-                  throw new IllegalArgumentException("Specified type " + type.getName() + " is not assignable to "
-                        + obj);
-               }
-            }
-            catch (Exception e)
-            {
-               throw new IllegalArgumentException("Unable to create implemenation: " + className, e);
-            }
-         }
-      });
-   }
-
-}

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/JavaArchiveFactory.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/JavaArchiveFactory.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/JavaArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-
-/**
- * JavaArchiveFactory
- * 
- * Factory used to create {@link JavaArchive} instances. 
- * 
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public abstract class JavaArchiveFactory extends ArchiveFactory<JavaArchive>
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Implementation type as a FQN to avoid direct compile-time dependency
-    */
-   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.JavaArchiveFactoryImpl";
-
-   /**
-    * Instance of JavaArchiveFactory implementation
-    */
-   private static JavaArchiveFactory instance;
-
-   //-------------------------------------------------------------------------------------||
-   // Class Methods ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Creates a {@link JavaArchive} instance with the provided name.
-    * 
-    * @param archiveName
-    * @return JavaArchive 
-    * @throws IllegalArgumentException if the archiveName is not present
-    */
-   public static JavaArchive create(String archiveName)
-   {
-      return getInstance().doCreate(archiveName);
-   }
-   
-   /**
-    * Return instance of the JavaArchiveFactory
-    * 
-    * @return
-    */
-   private synchronized static JavaArchiveFactory getInstance()
-   {
-      if (instance == null)
-      {
-         instance = createInstance(JavaArchiveFactory.class, IMPL_TYPE);
-      }
-      return instance;
-   }
-}

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ResourceAdapterArchiveFactory.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ResourceAdapterArchiveFactory.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ResourceAdapterArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
-
-/**
- * ResourceAdapterArchiveFactory
- * 
- * Factory used to create {@link ResourceAdapterArchive} instances. 
- * 
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public abstract class ResourceAdapterArchiveFactory extends ArchiveFactory<ResourceAdapterArchive>
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Implementation type as a FQN to avoid direct compile-time dependency
-    */
-   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.ResourceAdapterArchiveFactoryImpl";
-
-   /**
-    * Instance of ResourceAdapterArchiveFactory implementation
-    */
-   private static ResourceAdapterArchiveFactory instance;
-
-   //-------------------------------------------------------------------------------------||
-   // Class Methods ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Creates a {@link ResourceAdapterArchive} instance with the provided name.
-    * 
-    * @param archiveName
-    * @return ResourceAdapterArchive 
-    * @throws IllegalArgumentException if the archiveName is not present
-    */
-   public static ResourceAdapterArchive create(String archiveName)
-   {
-      return getInstance().doCreate(archiveName);
-   }
-
-   /**
-    * Return instance of the ResourceAdapterArchive
-    * 
-    * @return
-    */
-   private synchronized static ResourceAdapterArchiveFactory getInstance()
-   {
-      if (instance == null)
-      {
-         instance = createInstance(ResourceAdapterArchiveFactory.class, IMPL_TYPE);
-      }
-      return instance;
-   }
-}

Deleted: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/WebArchiveFactory.java
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/WebArchiveFactory.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/WebArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.api;
-
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-
-/**
- * WebArchiveFactory
- * 
- * Factory used to create {@link WebArchive} instances. 
- * 
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public abstract class WebArchiveFactory extends ArchiveFactory<WebArchive>
-{
-
-   //-------------------------------------------------------------------------------------||
-   // Class Members ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Implementation type as a FQN to avoid direct compile-time dependency
-    */
-   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.WebArchiveFactoryImpl";
-
-   /**
-    * Instance of WebArchiveFactory implementation
-    */
-   private static WebArchiveFactory instance;
-
-   //-------------------------------------------------------------------------------------||
-   // Class Methods ----------------------------------------------------------------------||
-   //-------------------------------------------------------------------------------------||
-
-   /**
-    * Creates a {@link WebArchive} instance with the provided name.
-    * 
-    * @param archiveName
-    * @return WebArchive instance 
-    * @throws IllegalArgumentException if the archiveName is not present
-    */
-   public static WebArchive create(String archiveName)
-   {
-      return getInstance().doCreate(archiveName);
-   }
-
-   /**
-    * Return instance of the WebArchiveFactory
-    * 
-    * @return
-    */
-   private synchronized static WebArchiveFactory getInstance()
-   {
-      if (instance == null)
-      {
-         instance = createInstance(WebArchiveFactory.class, IMPL_TYPE);
-      }
-      return instance;
-   }
-}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ArchiveFactory.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ArchiveFactory.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ArchiveFactory.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+import org.jboss.shrinkwrap.api.Archive;
+
+/**
+ * ArchiveFactory
+ * 
+ * Template Factory used to create {@link Archive} instances. 
+ * 
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+abstract class ArchiveFactory<T extends Archive<T>>
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Methods ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Create an instance of an ArchiveFactory implementation
+    *  
+    * @return ArchiveFactory instance
+    */
+   protected synchronized static <T extends Archive<T>, F extends ArchiveFactory<T>> F createInstance(
+         Class<F> factoryBaseType, String fqFactoryName)
+   {
+      try
+      {
+         // Create the instance
+         F instance = FactoryUtil.createInstance(fqFactoryName, factoryBaseType);
+
+         // Return the instance
+         return instance;
+      }
+      catch (Exception e)
+      {
+         throw new IllegalStateException("Make sure you have the impl classes on your runtime classpath", e);
+      }
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Contracts --------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Template create method for concrete implementations  
+    * 
+    * @param archiveName
+    * @return Archive instance
+    */
+   protected abstract T doCreate(String archiveName);
+}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/EnterpriseArchiveFactory.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/EnterpriseArchiveFactory.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/EnterpriseArchiveFactory.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/EnterpriseArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+
+/**
+ * EnterpriseArchiveFactory
+ * 
+ * Factory used to create {@link EnterpriseArchive} instances. 
+ * 
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public abstract class EnterpriseArchiveFactory extends ArchiveFactory<EnterpriseArchive>
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Implementation type as a FQN to avoid direct compile-time dependency
+    */
+   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.spec.EnterpriseArchiveFactoryImpl";
+
+   /**
+    * Instance of EnterpriseArchiveFactory implementation
+    */
+   private static EnterpriseArchiveFactory instance;
+
+   //-------------------------------------------------------------------------------------||
+   // Class Methods ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a {@link EnterpriseArchive} instance with the provided name.
+    * 
+    * @param archiveName
+    * @return EnterpriseArchive instance 
+    * @throws IllegalArgumentException if the archiveName is not present
+    */
+   public static EnterpriseArchive create(String archiveName)
+   {
+      return getInstance().doCreate(archiveName);
+   }
+
+   /**
+    * Return instance of the EnterpriseArchiveFactory
+    * 
+    * @return
+    */
+   private synchronized static EnterpriseArchiveFactory getInstance()
+   {
+      if (instance == null)
+      {
+         instance = createInstance(EnterpriseArchiveFactory.class, IMPL_TYPE);
+      }
+      return instance;
+   }
+
+}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/FactoryUtil.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/FactoryUtil.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/FactoryUtil.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/FactoryUtil.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.logging.Logger;
+
+/**
+ * FactoryUtil
+ * 
+ * Package-private factory utilities 
+ *
+ * @author <a href="mailto:andrew.rubinger at jboss.org">ALR</a>
+ * @version $Revision: $
+ */
+class FactoryUtil
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Logger
+    */
+   private static final Logger log = Logger.getLogger(FactoryUtil.class.getName());
+
+   //-------------------------------------------------------------------------------------||
+   // Constructor ------------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Prohibit instantiation
+    */
+   private FactoryUtil()
+   {
+      throw new UnsupportedOperationException("No instances should be created; stateless utility class");
+   }
+
+   //-------------------------------------------------------------------------------------||
+   // Functional Methods -----------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Create an instance of the Class with the specified FQN, of the expected
+    * type
+    * 
+    * @throws IllegalArgumentException If the specified type is not assignable to the instance
+    *       of the class created from the specified class name, or if either argument is not
+    *       supplied
+    */
+   static <T> T createInstance(final String className, final Class<T> type) throws IllegalArgumentException
+   {
+      // Precondition checks
+      if (className == null || className.length() == 0)
+      {
+         throw new IllegalArgumentException("className must be specified");
+      }
+      if (type == null)
+      {
+         throw new IllegalArgumentException("type must be specified");
+      }
+
+      return AccessController.doPrivileged(new PrivilegedAction<T>()
+      {
+         public T run()
+         {
+            try
+            {
+               final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
+               final Class<?> clazz = Class.forName(className, false, classLoader);
+               final Object obj = clazz.newInstance();
+               try
+               {
+                  return type.cast(obj);
+               }
+               catch (final ClassCastException cee)
+               {
+                  throw new IllegalArgumentException("Specified type " + type.getName() + " is not assignable to "
+                        + obj);
+               }
+            }
+            catch (Exception e)
+            {
+               throw new IllegalArgumentException("Unable to create implemenation: " + className, e);
+            }
+         }
+      });
+   }
+
+}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/JavaArchiveFactory.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/JavaArchiveFactory.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/JavaArchiveFactory.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/JavaArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+
+/**
+ * JavaArchiveFactory
+ * 
+ * Factory used to create {@link JavaArchive} instances. 
+ * 
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public abstract class JavaArchiveFactory extends ArchiveFactory<JavaArchive>
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Implementation type as a FQN to avoid direct compile-time dependency
+    */
+   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.spec.JavaArchiveFactoryImpl";
+
+   /**
+    * Instance of JavaArchiveFactory implementation
+    */
+   private static JavaArchiveFactory instance;
+
+   //-------------------------------------------------------------------------------------||
+   // Class Methods ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a {@link JavaArchive} instance with the provided name.
+    * 
+    * @param archiveName
+    * @return JavaArchive 
+    * @throws IllegalArgumentException if the archiveName is not present
+    */
+   public static JavaArchive create(String archiveName)
+   {
+      return getInstance().doCreate(archiveName);
+   }
+   
+   /**
+    * Return instance of the JavaArchiveFactory
+    * 
+    * @return
+    */
+   private synchronized static JavaArchiveFactory getInstance()
+   {
+      if (instance == null)
+      {
+         instance = createInstance(JavaArchiveFactory.class, IMPL_TYPE);
+      }
+      return instance;
+   }
+}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ResourceAdapterArchiveFactory.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/ResourceAdapterArchiveFactory.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ResourceAdapterArchiveFactory.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/ResourceAdapterArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+
+/**
+ * ResourceAdapterArchiveFactory
+ * 
+ * Factory used to create {@link ResourceAdapterArchive} instances. 
+ * 
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public abstract class ResourceAdapterArchiveFactory extends ArchiveFactory<ResourceAdapterArchive>
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Implementation type as a FQN to avoid direct compile-time dependency
+    */
+   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.spec.ResourceAdapterArchiveFactoryImpl";
+
+   /**
+    * Instance of ResourceAdapterArchiveFactory implementation
+    */
+   private static ResourceAdapterArchiveFactory instance;
+
+   //-------------------------------------------------------------------------------------||
+   // Class Methods ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a {@link ResourceAdapterArchive} instance with the provided name.
+    * 
+    * @param archiveName
+    * @return ResourceAdapterArchive 
+    * @throws IllegalArgumentException if the archiveName is not present
+    */
+   public static ResourceAdapterArchive create(String archiveName)
+   {
+      return getInstance().doCreate(archiveName);
+   }
+
+   /**
+    * Return instance of the ResourceAdapterArchive
+    * 
+    * @return
+    */
+   private synchronized static ResourceAdapterArchiveFactory getInstance()
+   {
+      if (instance == null)
+      {
+         instance = createInstance(ResourceAdapterArchiveFactory.class, IMPL_TYPE);
+      }
+      return instance;
+   }
+}

Copied: shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/WebArchiveFactory.java (from rev 3594, shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/WebArchiveFactory.java)
===================================================================
--- shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/WebArchiveFactory.java	                        (rev 0)
+++ shrinkwrap/trunk/api/src/main/java/org/jboss/shrinkwrap/api/spec/WebArchiveFactory.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.api.spec;
+
+
+/**
+ * WebArchiveFactory
+ * 
+ * Factory used to create {@link WebArchive} instances. 
+ * 
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public abstract class WebArchiveFactory extends ArchiveFactory<WebArchive>
+{
+
+   //-------------------------------------------------------------------------------------||
+   // Class Members ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Implementation type as a FQN to avoid direct compile-time dependency
+    */
+   private static final String IMPL_TYPE = "org.jboss.shrinkwrap.impl.base.spec.WebArchiveFactoryImpl";
+
+   /**
+    * Instance of WebArchiveFactory implementation
+    */
+   private static WebArchiveFactory instance;
+
+   //-------------------------------------------------------------------------------------||
+   // Class Methods ----------------------------------------------------------------------||
+   //-------------------------------------------------------------------------------------||
+
+   /**
+    * Creates a {@link WebArchive} instance with the provided name.
+    * 
+    * @param archiveName
+    * @return WebArchive instance 
+    * @throws IllegalArgumentException if the archiveName is not present
+    */
+   public static WebArchive create(String archiveName)
+   {
+      return getInstance().doCreate(archiveName);
+   }
+
+   /**
+    * Return instance of the WebArchiveFactory
+    * 
+    * @return
+    */
+   private synchronized static WebArchiveFactory getInstance()
+   {
+      if (instance == null)
+      {
+         instance = createInstance(WebArchiveFactory.class, IMPL_TYPE);
+      }
+      return instance;
+   }
+}

Deleted: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/EnterpriseArchiveFactoryImpl.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/EnterpriseArchiveFactoryImpl.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/EnterpriseArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.impl.base;
-
-import org.jboss.shrinkwrap.api.EnterpriseArchiveFactory;
-import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
-import org.jboss.shrinkwrap.impl.base.spec.EnterpriseArchiveImpl;
-import org.jboss.shrinkwrap.spi.MemoryMapArchive;
-
-/**
- * EnterpriseArchiveFactoryImpl
- * 
- * EnterpriseArchiveFactory implementation used to create {@link EnterpriseArchive} instances. Thread-safe.
- *
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public class EnterpriseArchiveFactoryImpl extends EnterpriseArchiveFactory
-{
-
-   /*
-    * {@inheritDoc}
-    * @see org.jboss.declarchive.api.EnterpriseArchiveFactory#doCreate(java.lang.String)
-    */
-   @Override
-   protected EnterpriseArchive doCreate(String archiveName)
-   {
-      // Create storage delegate
-      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
-
-      // Create enterprise archive
-      EnterpriseArchive enterpriseArchive = new EnterpriseArchiveImpl(memoryMapArchive);
-
-      // Return archive
-      return enterpriseArchive;
-   }
-
-}

Deleted: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/JavaArchiveFactoryImpl.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/JavaArchiveFactoryImpl.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/JavaArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.impl.base;
-
-import org.jboss.shrinkwrap.api.JavaArchiveFactory;
-import org.jboss.shrinkwrap.api.spec.JavaArchive;
-import org.jboss.shrinkwrap.impl.base.spec.JavaArchiveImpl;
-import org.jboss.shrinkwrap.spi.MemoryMapArchive;
-
-/**
- * JavaArchiveFactoryImpl
- * 
- * JavaArchiveFactory implementation used to create {@link JavaArchive} instances. Thread-safe.
- *
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public class JavaArchiveFactoryImpl extends JavaArchiveFactory
-{
-
-   /*
-    * {@inheritDoc}
-    * @see org.jboss.declarchive.api.JavaArchiveFactory#doCreate(java.lang.String)
-    */
-   @Override
-   protected JavaArchive doCreate(String archiveName)
-   {
-      // Create storage delegate
-      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
-
-      // Create Java Archive
-      JavaArchive javaArchive = new JavaArchiveImpl(memoryMapArchive);
-
-      // Return archive
-      return javaArchive;
-   }
-
-}

Deleted: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ResourceAdapterArchiveFactoryImpl.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ResourceAdapterArchiveFactoryImpl.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ResourceAdapterArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.impl.base;
-
-import org.jboss.shrinkwrap.api.ResourceAdapterArchiveFactory;
-import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
-import org.jboss.shrinkwrap.impl.base.spec.ResourceAdapterArchiveImpl;
-import org.jboss.shrinkwrap.spi.MemoryMapArchive;
-
-/**
- * ResourceAdapterArchiveFactoryImpl
- * 
- * ResourceAdapterArchiveFactory implementation used to create {@link ResourceAdapterArchive} instances. Thread-safe.
- *
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public class ResourceAdapterArchiveFactoryImpl extends ResourceAdapterArchiveFactory
-{
-
-   /*
-    * {@inheritDoc}
-    * @see org.jboss.declarchive.api.ResourceAdapterArchiveFactory#doCreate(java.lang.String)
-    */
-   @Override
-   protected ResourceAdapterArchive doCreate(String archiveName)
-   {
-      // Create storage delegate
-      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
-
-      // Create Resource Adapter Archive
-      ResourceAdapterArchive resourceAdapterArchive = new ResourceAdapterArchiveImpl(memoryMapArchive);
-
-      // Return archive
-      return resourceAdapterArchive;
-   }
-
-}

Deleted: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/WebArchiveFactoryImpl.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/WebArchiveFactoryImpl.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/WebArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.shrinkwrap.impl.base;
-
-import org.jboss.shrinkwrap.api.WebArchiveFactory;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.impl.base.spec.WebArchiveImpl;
-import org.jboss.shrinkwrap.spi.MemoryMapArchive;
-
-/**
- * WebArchiveFactoryImpl
- * 
- * WebArchiveFactory implementation used to create {@link WebArchive} instances. Thread-safe.
- *
- * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
- * @version $Revision: $
- */
-public class WebArchiveFactoryImpl extends WebArchiveFactory
-{
-
-   /*
-    * {@inheritDoc}
-    * @see org.jboss.declarchive.api.WebArchiveFactory#doCreate(java.lang.String)
-    */
-   @Override
-   protected WebArchive doCreate(String archiveName)
-   {
-      // Create storage delegate
-      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
-
-      // Create web archive
-      WebArchive webArchive = new WebArchiveImpl(memoryMapArchive);
-
-      // Return archive
-      return webArchive;
-   }
-
-}

Copied: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/EnterpriseArchiveFactoryImpl.java (from rev 3594, shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/EnterpriseArchiveFactoryImpl.java)
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/EnterpriseArchiveFactoryImpl.java	                        (rev 0)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/EnterpriseArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.impl.base.spec;
+
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchiveFactory;
+import org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl;
+import org.jboss.shrinkwrap.spi.MemoryMapArchive;
+
+/**
+ * EnterpriseArchiveFactoryImpl
+ * 
+ * EnterpriseArchiveFactory implementation used to create {@link EnterpriseArchive} instances. Thread-safe.
+ *
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public class EnterpriseArchiveFactoryImpl extends EnterpriseArchiveFactory
+{
+
+   /*
+    * {@inheritDoc}
+    * @see org.jboss.declarchive.api.EnterpriseArchiveFactory#doCreate(java.lang.String)
+    */
+   @Override
+   protected EnterpriseArchive doCreate(String archiveName)
+   {
+      // Create storage delegate
+      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
+
+      // Create enterprise archive
+      EnterpriseArchive enterpriseArchive = new EnterpriseArchiveImpl(memoryMapArchive);
+
+      // Return archive
+      return enterpriseArchive;
+   }
+
+}

Copied: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/JavaArchiveFactoryImpl.java (from rev 3594, shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/JavaArchiveFactoryImpl.java)
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/JavaArchiveFactoryImpl.java	                        (rev 0)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/JavaArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.impl.base.spec;
+
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchiveFactory;
+import org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl;
+import org.jboss.shrinkwrap.spi.MemoryMapArchive;
+
+/**
+ * JavaArchiveFactoryImpl
+ * 
+ * JavaArchiveFactory implementation used to create {@link JavaArchive} instances. Thread-safe.
+ *
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public class JavaArchiveFactoryImpl extends JavaArchiveFactory
+{
+
+   /*
+    * {@inheritDoc}
+    * @see org.jboss.declarchive.api.JavaArchiveFactory#doCreate(java.lang.String)
+    */
+   @Override
+   protected JavaArchive doCreate(String archiveName)
+   {
+      // Create storage delegate
+      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
+
+      // Create Java Archive
+      JavaArchive javaArchive = new JavaArchiveImpl(memoryMapArchive);
+
+      // Return archive
+      return javaArchive;
+   }
+
+}

Copied: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/ResourceAdapterArchiveFactoryImpl.java (from rev 3594, shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/ResourceAdapterArchiveFactoryImpl.java)
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/ResourceAdapterArchiveFactoryImpl.java	                        (rev 0)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/ResourceAdapterArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.impl.base.spec;
+
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchiveFactory;
+import org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl;
+import org.jboss.shrinkwrap.spi.MemoryMapArchive;
+
+/**
+ * ResourceAdapterArchiveFactoryImpl
+ * 
+ * ResourceAdapterArchiveFactory implementation used to create {@link ResourceAdapterArchive} instances. Thread-safe.
+ *
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public class ResourceAdapterArchiveFactoryImpl extends ResourceAdapterArchiveFactory
+{
+
+   /*
+    * {@inheritDoc}
+    * @see org.jboss.declarchive.api.ResourceAdapterArchiveFactory#doCreate(java.lang.String)
+    */
+   @Override
+   protected ResourceAdapterArchive doCreate(String archiveName)
+   {
+      // Create storage delegate
+      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
+
+      // Create Resource Adapter Archive
+      ResourceAdapterArchive resourceAdapterArchive = new ResourceAdapterArchiveImpl(memoryMapArchive);
+
+      // Return archive
+      return resourceAdapterArchive;
+   }
+
+}

Copied: shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/WebArchiveFactoryImpl.java (from rev 3594, shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/WebArchiveFactoryImpl.java)
===================================================================
--- shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/WebArchiveFactoryImpl.java	                        (rev 0)
+++ shrinkwrap/trunk/impl-base/src/main/java/org/jboss/shrinkwrap/impl/base/spec/WebArchiveFactoryImpl.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.shrinkwrap.impl.base.spec;
+
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchiveFactory;
+import org.jboss.shrinkwrap.impl.base.MemoryMapArchiveImpl;
+import org.jboss.shrinkwrap.spi.MemoryMapArchive;
+
+/**
+ * WebArchiveFactoryImpl
+ * 
+ * WebArchiveFactory implementation used to create {@link WebArchive} instances. Thread-safe.
+ *
+ * @author <a href="mailto:baileyje at gmail.com">John Bailey</a>
+ * @version $Revision: $
+ */
+public class WebArchiveFactoryImpl extends WebArchiveFactory
+{
+
+   /*
+    * {@inheritDoc}
+    * @see org.jboss.declarchive.api.WebArchiveFactory#doCreate(java.lang.String)
+    */
+   @Override
+   protected WebArchive doCreate(String archiveName)
+   {
+      // Create storage delegate
+      MemoryMapArchive memoryMapArchive = new MemoryMapArchiveImpl(archiveName);
+
+      // Create web archive
+      WebArchive webArchive = new WebArchiveImpl(memoryMapArchive);
+
+      // Return archive
+      return webArchive;
+   }
+
+}

Modified: shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/EnterpriseArchiveFactoryTestCase.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/EnterpriseArchiveFactoryTestCase.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/EnterpriseArchiveFactoryTestCase.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -18,8 +18,8 @@
 
 import junit.framework.Assert;
 
-import org.jboss.shrinkwrap.api.EnterpriseArchiveFactory;
 import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchiveFactory;
 import org.junit.Test;
 
 /**

Modified: shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/JavaArchiveFactoryTestCase.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/JavaArchiveFactoryTestCase.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/JavaArchiveFactoryTestCase.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -18,8 +18,8 @@
 
 import junit.framework.Assert;
 
-import org.jboss.shrinkwrap.api.JavaArchiveFactory;
 import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.JavaArchiveFactory;
 import org.junit.Test;
 
 /**

Modified: shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/ResourceAdapterArchiveFactoryTestCase.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/ResourceAdapterArchiveFactoryTestCase.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/ResourceAdapterArchiveFactoryTestCase.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -18,8 +18,8 @@
 
 import junit.framework.Assert;
 
-import org.jboss.shrinkwrap.api.ResourceAdapterArchiveFactory;
 import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive;
+import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchiveFactory;
 import org.junit.Test;
 
 /**

Modified: shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/WebArchiveFactoryTestCase.java
===================================================================
--- shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/WebArchiveFactoryTestCase.java	2009-10-14 14:58:38 UTC (rev 3599)
+++ shrinkwrap/trunk/impl-base/src/test/java/org/jboss/shrinkwrap/impl/base/unit/WebArchiveFactoryTestCase.java	2009-10-14 15:22:40 UTC (rev 3600)
@@ -18,8 +18,8 @@
 
 import junit.framework.Assert;
 
-import org.jboss.shrinkwrap.api.WebArchiveFactory;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchiveFactory;
 import org.junit.Test;
 
 /**



More information about the jboss-svn-commits mailing list