[jboss-cvs] JBossAS SVN: r95096 - in projects/jboss-osgi: projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer and 11 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Oct 19 04:13:36 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-19 04:13:35 -0400 (Mon, 19 Oct 2009)
New Revision: 95096

Added:
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Attachments.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Deployment.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/DeploymentBase.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceBase.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentRegistryService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptor.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptorService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/DeploymentScannerService.java
Removed:
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Attachments.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerServiceBase.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentBase.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java
Modified:
   projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java
   projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
   projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
   projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
   projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
   projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
Log:
Seperate notion of deployer from interceptor 

Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerActivator.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.deployment.DeploymentScannerService;
+import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 

Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/DeploymentScannerImpl.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -34,9 +34,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.jboss.osgi.deployment.Deployment;
-import org.jboss.osgi.deployment.DeploymentScannerService;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;

Modified: projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java
===================================================================
--- projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/hotdeploy/trunk/src/main/java/org/jboss/osgi/hotdeploy/internal/ScannerThread.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -24,7 +24,7 @@
 //$Id$
 
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.deployment.DeploymentScannerService;
+import org.jboss.osgi.deployment.scanner.DeploymentScannerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.log.LogService;
 

Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.deployment.DeploymentServiceCapability;
+import org.jboss.osgi.deployment.deployer.DeployerServiceCapability;
 import org.jboss.osgi.spi.capability.Capability;
 import org.jboss.osgi.spi.capability.CompendiumCapability;
 import org.jboss.osgi.spi.service.MicrocontainerService;
@@ -47,7 +47,7 @@
       super(MicrocontainerService.class.getName());
       
       addDependency(new CompendiumCapability());
-      addDependency(new DeploymentServiceCapability());
+      addDependency(new DeployerServiceCapability());
       
       addBundle("bundles/jboss-osgi-microcontainer.jar");
    }

Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -47,9 +47,9 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.osgi.deployment.Deployment;
-import org.jboss.osgi.deployment.DeployerServiceBase;
-import org.jboss.osgi.deployment.DeploymentRegistryService;
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.deployer.DeployerServiceBase;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
 import org.jboss.osgi.spi.OSGiConstants;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.service.MicrocontainerService;

Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -35,7 +35,7 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeployerService;
 import org.jboss.osgi.jbossxb.XMLBindingService;
 import org.jboss.osgi.microcontainer.integration.AbstractMicrocontainerService;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;

Modified: projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/FelixBundleContextWrapper.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -26,7 +26,7 @@
 import java.net.URL;
 
 import org.jboss.logging.Logger;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeployerService;
 import org.jboss.osgi.spi.framework.BundleContextWrapper;
 import org.jboss.osgi.spi.util.BundleInfo;
 import org.osgi.framework.Bundle;

Modified: projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/projects/runtime/jbossas/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -31,7 +31,7 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.logging.Logger;
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeployerService;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.BundleContext;

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Attachments.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Attachments.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Attachments.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-// $Id$
-
-import java.util.Collection;
-
-/**
- * An interface for general Attachments
- * 
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public interface Attachments
-{
-   /** Get attachment keys */
-   Collection<Key> getAttachmentKeys();
-
-   /** Add arbitrary attachment */
-   <T> T addAttachment(Class<T> clazz, Object value);
-
-   /** Add arbitrary attachment with name */
-   <T> T addAttachment(Class<T> clazz, String name, Object value);
-
-   /** Add arbitrary attachment with name */
-   Object addAttachment(String name, Object value);
-
-   /** Get an arbitrary attachment */
-   <T> T getAttachment(Class<T> clazz);
-
-   /** Get an arbitrary attachment */
-   <T> T getAttachment(Class<T> clazz, String name);
-
-   /** Get an arbitrary attachment */
-   Object getAttachment(String name);
-
-   /** Remove arbitrary attachments */
-   <T> T removeAttachment(Class<T> clazz);
-
-   /** Remove arbitrary attachments */
-   <T> T removeAttachment(Class<T> clazz, String name);
-
-   /** Remove arbitrary attachments */
-   Object removeAttachment(String name);
-
-   /**
-    * A key for attachements
-    */
-   public static class Key
-   {
-      private Class<?> clazz;
-      private String name;
-
-      /**
-       * Construct the key with optional class and name
-       */
-      public Key(Class<?> clazz, String name)
-      {
-         this.clazz = clazz;
-         this.name = name;
-      }
-
-      public static Key valueOf(String key)
-      {
-         int index = key.indexOf(",");
-         if (key.startsWith("[") && key.endsWith("]") && index > 0)
-         {
-            Class<?> classPart = null;
-            String className = key.substring(1, index);
-            String namePart = key.substring(index + 1, key.length() - 1);
-            if (className.length() > 0 && !className.equals("null"))
-            {
-               try
-               {
-                  classPart = Class.forName(className);
-               }
-               catch (ClassNotFoundException ex)
-               {
-                  throw new IllegalArgumentException("Cannot find class '" + className + "' in: " + key);
-               }
-            }
-            return new Key(classPart, namePart);
-         }
-         return null;
-      }
-
-      /**
-       * Get the class part for this key
-       * 
-       * @return maybe null
-       */
-      public Class<?> getClassPart()
-      {
-         return clazz;
-      }
-
-      /**
-       * Get the name part for this key
-       * 
-       * @return maybe null
-       */
-      public String getNamePart()
-      {
-         return name;
-      }
-
-      /**
-       * Two keys are equal if their {@link #toString()} is equal
-       */
-      public boolean equals(Object obj)
-      {
-         if (!(obj instanceof Key))
-            return false;
-         if (obj == this)
-            return true;
-         return obj.toString().equals(toString());
-      }
-
-      /**
-       * Two keys have the same hashCode if their {@link #toString()} is equal
-       */
-      public int hashCode()
-      {
-         return toString().hashCode();
-      }
-
-      /**
-       * Returns the String repesentation of this Key.
-       * <p/>
-       * 
-       * <pre>
-       * &quot;[&quot; + clazz + &quot;,&quot; + name + &quot;]&quot;
-       * </pre>
-       */
-      public String toString()
-      {
-         return "[" + clazz + "," + name + "]";
-      }
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id$
-
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-import org.osgi.framework.BundleException;
-
-/**
- * A Service that can be used to deploy/undeploy bundles or archives to/from the runtime.
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface DeployerService
-{
-   /**
-    * The object name under which this is registered: 'jboss.osgi:service=DeployerService'
-    */
-   ObjectName MBEAN_DEPLOYER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=DeployerService");
-
-   /** 
-    * Create a deployment from the given location. 
-    */
-   Deployment createDeployment(String location) throws BundleException;
-   
-   /**
-    * Deploy an array of bundles
-    */
-   void deploy(Deployment[] bundleDeps) throws BundleException;
-
-   /**
-    * Undeploy an array of bundles
-    */
-   void undeploy(Deployment[] bundleDeps) throws BundleException;
-
-   /**
-    * Deploy bundle from URL
-    */
-   void deploy(URL url) throws BundleException;
-
-   /**
-    * Undeploy bundle from URL.
-    * 
-    * Note, due to the dynamic nature of OSGi services it is 
-    * possible that a {@link DeployerService} is asked to undeploy 
-    * a bundle URL which it did not deploy itself.
-    * 
-    * In this case this method should return false, so that  
-    * another {@link DeployerService} can be tried.
-    * 
-    * @return true if this service could undeploy the bundle
-    */
-   boolean undeploy(URL url) throws BundleException;
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerServiceBase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerServiceBase.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerServiceBase.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.jar.Attributes;
-import java.util.jar.JarFile;
-import java.util.jar.Manifest;
-
-import org.jboss.osgi.deployment.internal.DeploymentImpl;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.Constants;
-
-//$Id$
-
-/**
- * An abstract base implementation of the DeployerService.
- * 
- * @author thomas.diesler at jboss.com
- * @since 16-Oct-2009
- */
-public abstract class DeployerServiceBase implements DeployerService
-{
-   public Deployment createDeployment(String location) throws BundleException
-   {
-      // Try location as URL
-      URL url = null;
-      try
-      {
-         url = new URL(location);
-      }
-      catch (MalformedURLException ex)
-      {
-         // ignore
-      }
-
-      // Try location as File
-      if (url == null)
-      {
-         try
-         {
-            File file = new File(location);
-            if (file.exists())
-               url = file.toURI().toURL();
-         }
-         catch (MalformedURLException e)
-         {
-            // ignore
-         }
-      }
-      
-      if (url == null)
-         throw new IllegalArgumentException("Invalid bundle location: " + location);
-
-      return createDeploymentInternal(url);
-   }
-
-   private Deployment createDeploymentInternal(URL url) throws BundleException
-   {
-      Manifest manifest;
-      try
-      {
-         JarFile jarFile = new JarFile(url.getPath());
-         manifest = jarFile.getManifest();
-         jarFile.close();
-      }
-      catch (IOException ex)
-      {
-         throw new BundleException("Cannot get manifest from: " + url);
-
-      }
-
-      Attributes attribs = manifest.getMainAttributes();
-      String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
-      if (symbolicName == null)
-         throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + url);
-
-      String version = attribs.getValue(Constants.BUNDLE_VERSION);
-      return new DeploymentImpl(url, symbolicName, version);
-   }
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-import java.net.URL;
-
-//$Id$
-
-/**
- * An abstraction of a bundle deployment
- * 
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public interface Deployment extends Attachments
-{
-   /**
-    * Get the bundle location
-    */
-   public URL getLocation();
-
-   /**
-    * Get the bundle symbolic name
-    */
-   public String getSymbolicName();
-
-   /**
-    * Get the bundle version
-    */
-   public String getVersion();
-
-   /**
-    * Get the start level associated with this deployment
-    */
-   public int getStartLevel();
-
-   /**
-    * Set the start level associated with this deployment
-    */
-   public void setStartLevel(int startLevel);
-
-   /**
-    * Get the autostart flag associated with this deployment
-    */
-   public boolean isAutoStart();
-
-   /**
-    * Set the autostart flag associated with this deployment
-    */
-   public void setAutoStart(boolean autoStart);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentBase.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentBase.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentBase.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,120 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-// $Id$
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * Basic attachments.
- * 
- * @author Thomas.Diesler at jboss.com
- * @since 20-Apr-2007
- */
-public abstract class DeploymentBase implements Attachments
-{
-  private Map<Key, Object> attachments = new HashMap<Key, Object>();
-  
-  /** Construct the execution context with no attachments */
-  public DeploymentBase()
-  {
-    
-  }
-  
-  /** Construct the execution context with given attachments */
-  public DeploymentBase(Attachments att)
-  {
-    if (att != null)
-    {
-      for (Key key : att.getAttachmentKeys())
-      {
-        Object value = att.getAttachment(key.getClassPart(), key.getNamePart());
-        this.attachments.put(key, value);
-      }
-    }
-  }
-
-  public Collection<Key> getAttachmentKeys()
-  {
-    return attachments.keySet();
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T getAttachment(Class<T> clazz)
-  {
-    return (T)attachments.get(new Key(clazz, null));
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T getAttachment(Class<T> clazz, String name)
-  {
-    return (T)attachments.get(new Key(clazz, name));
-  }
-
-  public Object getAttachment(String name)
-  {
-    return attachments.get(new Key(null, name));
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T addAttachment(Class<T> clazz, Object obj)
-  {
-    return (T)attachments.put(new Key(clazz, null), obj);
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T addAttachment(Class<T> clazz, String name, Object obj)
-  {
-    return (T)attachments.put(new Key(clazz, name), obj);
-  }
-
-  public Object addAttachment(String name, Object obj)
-  {
-    return attachments.put(new Key(null, name), obj);
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T removeAttachment(Class<T> clazz)
-  {
-    return (T)attachments.remove(new Key(clazz, null));
-  }
-
-  @SuppressWarnings("unchecked")
-  public <T> T removeAttachment(Class<T> clazz, String name)
-  {
-    return (T)attachments.remove(new Key(clazz, name));
-  }
-
-  public Object removeAttachment(String name)
-  {
-    return attachments.remove(new Key(null, name));
-  }
-  
-  public String toString()
-  {
-    return attachments.toString();
-  }
-}

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id$
-
-
-/**
- * An OSGi deployer
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Oct-2009
- */
-public interface DeploymentInterceptor
-{
-   enum Phase { 
-      BEFORE_INSTALLED, 
-      AFTER_INSTALLED,
-      BEFORE_RESOLVED, 
-      AFTER_RESOLVED,
-      BEFORE_ACTIVE, 
-      AFTER_ACTIVE
-   }
-   
-   void deploy(Deployment dep);
-   
-   void undeploy(Deployment dep);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id$
-
-
-/**
- * The deployers service
- * 
- * @author thomas.diesler at jboss.com
- * @since 15-Oct-2009
- */
-public interface DeploymentInterceptorService
-{
-   void addInterceptor(DeploymentInterceptor deployer);
-   
-   void removeInterceptor(DeploymentInterceptor deployer);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id: DeployerService.java 90894 2009-07-07 11:58:40Z thomas.diesler at jboss.com $
-
-import java.net.URL;
-
-import org.osgi.framework.Version;
-
-/**
- * A Service to register/unregister bundle deployments.
- * 
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2009
- */
-public interface DeploymentRegistryService
-{
-   /**
-    * Create a bundle deployment from the given bundle URL
-    * @return null, if this service does not maintain the bundle deployment
-    */
-   Deployment getBundleDeployment(URL url);
-   
-   /**
-    * Get the bundle deployment for the given bundle symbolicName and version
-    * @return null, if this service does not maintain the bundle deployment
-    */
-   Deployment getBundleDeployment(String symbolicName, Version version);
-
-   /**
-    * Register a bundle deployment
-    */
-   void registerBundleDeployment(Deployment dep);
-   
-   /**
-    * Unregister a bundle deployment
-    */
-   void unregisterBundleDeployment(Deployment dep);
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id$
-
-import java.net.URL;
-
-
-/**
- * A service that scans a directory location for new/removed bundles.
- * 
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public interface DeploymentScannerService
-{
-   /**
-    * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
-    */
-   String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
-   
-   /**
-    * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
-    */
-   String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
-   
-   /**
-    * Get the scan location URL.
-    *  
-    * This is can be specified by setting the {@link #PROPERTY_SCAN_LOCATION} property. 
-    */
-   URL getScanLocation();
-   
-   /**
-    * The number of scans since the service started 
-    */
-   long getScanCount();
-   
-   /**
-    * The number of milliseconds between scans
-    * Defaults to 2000ms 
-    */
-   long getScanInterval();
-   
-   /**
-    * The timestamp of the last change
-    */
-   long getLastChange();
-   
-   /**
-    * Run a directory scan
-    */
-   void scan();
-   
-   /**
-    * Returns the array of bundles currently known to the deployemtn scanner. 
-    */
-   Deployment[] getBundleDeployments();
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -1,48 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt 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.osgi.deployment;
-
-//$Id$
-
-import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.testing.OSGiRuntime;
-
-/**
- * Adds the DeploymentService capability to the {@link OSGiRuntime}
- * under test. 
- * 
- * It is ignored if the {@link DeployerService} is already registered.
- * 
- * Installed bundles: jboss-osgi-deployment.jar
- * 
- * @author thomas.diesler at jboss.com
- * @since 16-Oct-2009
- */
-public class DeploymentServiceCapability extends Capability
-{
-   public DeploymentServiceCapability()
-   {
-      super(DeployerService.class.getName());
-      
-      addBundle("bundles/jboss-osgi-deployment.jar");
-   }
-}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Attachments.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Attachments.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Attachments.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Attachments.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.common;
+
+// $Id$
+
+import java.util.Collection;
+
+/**
+ * An interface for general Attachments
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public interface Attachments
+{
+   /** Get attachment keys */
+   Collection<Key> getAttachmentKeys();
+
+   /** Add arbitrary attachment */
+   <T> T addAttachment(Class<T> clazz, Object value);
+
+   /** Add arbitrary attachment with name */
+   <T> T addAttachment(Class<T> clazz, String name, Object value);
+
+   /** Add arbitrary attachment with name */
+   Object addAttachment(String name, Object value);
+
+   /** Get an arbitrary attachment */
+   <T> T getAttachment(Class<T> clazz);
+
+   /** Get an arbitrary attachment */
+   <T> T getAttachment(Class<T> clazz, String name);
+
+   /** Get an arbitrary attachment */
+   Object getAttachment(String name);
+
+   /** Remove arbitrary attachments */
+   <T> T removeAttachment(Class<T> clazz);
+
+   /** Remove arbitrary attachments */
+   <T> T removeAttachment(Class<T> clazz, String name);
+
+   /** Remove arbitrary attachments */
+   Object removeAttachment(String name);
+
+   /**
+    * A key for attachements
+    */
+   public static class Key
+   {
+      private Class<?> clazz;
+      private String name;
+
+      /**
+       * Construct the key with optional class and name
+       */
+      public Key(Class<?> clazz, String name)
+      {
+         this.clazz = clazz;
+         this.name = name;
+      }
+
+      public static Key valueOf(String key)
+      {
+         int index = key.indexOf(",");
+         if (key.startsWith("[") && key.endsWith("]") && index > 0)
+         {
+            Class<?> classPart = null;
+            String className = key.substring(1, index);
+            String namePart = key.substring(index + 1, key.length() - 1);
+            if (className.length() > 0 && !className.equals("null"))
+            {
+               try
+               {
+                  classPart = Class.forName(className);
+               }
+               catch (ClassNotFoundException ex)
+               {
+                  throw new IllegalArgumentException("Cannot find class '" + className + "' in: " + key);
+               }
+            }
+            return new Key(classPart, namePart);
+         }
+         return null;
+      }
+
+      /**
+       * Get the class part for this key
+       * 
+       * @return maybe null
+       */
+      public Class<?> getClassPart()
+      {
+         return clazz;
+      }
+
+      /**
+       * Get the name part for this key
+       * 
+       * @return maybe null
+       */
+      public String getNamePart()
+      {
+         return name;
+      }
+
+      /**
+       * Two keys are equal if their {@link #toString()} is equal
+       */
+      public boolean equals(Object obj)
+      {
+         if (!(obj instanceof Key))
+            return false;
+         if (obj == this)
+            return true;
+         return obj.toString().equals(toString());
+      }
+
+      /**
+       * Two keys have the same hashCode if their {@link #toString()} is equal
+       */
+      public int hashCode()
+      {
+         return toString().hashCode();
+      }
+
+      /**
+       * Returns the String repesentation of this Key.
+       * <p/>
+       * 
+       * <pre>
+       * &quot;[&quot; + clazz + &quot;,&quot; + name + &quot;]&quot;
+       * </pre>
+       */
+      public String toString()
+      {
+         return "[" + clazz + "," + name + "]";
+      }
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Deployment.java (from rev 95093, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/Deployment.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Deployment.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/Deployment.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.common;
+
+import java.net.URL;
+
+
+//$Id$
+
+/**
+ * An abstraction of a bundle deployment
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public interface Deployment extends Attachments
+{
+   /**
+    * Get the bundle location
+    */
+   public URL getLocation();
+
+   /**
+    * Get the bundle symbolic name
+    */
+   public String getSymbolicName();
+
+   /**
+    * Get the bundle version
+    */
+   public String getVersion();
+
+   /**
+    * Get the start level associated with this deployment
+    */
+   public int getStartLevel();
+
+   /**
+    * Set the start level associated with this deployment
+    */
+   public void setStartLevel(int startLevel);
+
+   /**
+    * Get the autostart flag associated with this deployment
+    */
+   public boolean isAutoStart();
+
+   /**
+    * Set the autostart flag associated with this deployment
+    */
+   public void setAutoStart(boolean autoStart);
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/DeploymentBase.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentBase.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/DeploymentBase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/common/DeploymentBase.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,121 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.common;
+
+// $Id$
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+
+
+/**
+ * Basic attachments.
+ * 
+ * @author Thomas.Diesler at jboss.com
+ * @since 20-Apr-2007
+ */
+public abstract class DeploymentBase implements Attachments
+{
+  private Map<Key, Object> attachments = new HashMap<Key, Object>();
+  
+  /** Construct the execution context with no attachments */
+  public DeploymentBase()
+  {
+    
+  }
+  
+  /** Construct the execution context with given attachments */
+  public DeploymentBase(Attachments att)
+  {
+    if (att != null)
+    {
+      for (Key key : att.getAttachmentKeys())
+      {
+        Object value = att.getAttachment(key.getClassPart(), key.getNamePart());
+        this.attachments.put(key, value);
+      }
+    }
+  }
+
+  public Collection<Key> getAttachmentKeys()
+  {
+    return attachments.keySet();
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T getAttachment(Class<T> clazz)
+  {
+    return (T)attachments.get(new Key(clazz, null));
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T getAttachment(Class<T> clazz, String name)
+  {
+    return (T)attachments.get(new Key(clazz, name));
+  }
+
+  public Object getAttachment(String name)
+  {
+    return attachments.get(new Key(null, name));
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T addAttachment(Class<T> clazz, Object obj)
+  {
+    return (T)attachments.put(new Key(clazz, null), obj);
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T addAttachment(Class<T> clazz, String name, Object obj)
+  {
+    return (T)attachments.put(new Key(clazz, name), obj);
+  }
+
+  public Object addAttachment(String name, Object obj)
+  {
+    return attachments.put(new Key(null, name), obj);
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T removeAttachment(Class<T> clazz)
+  {
+    return (T)attachments.remove(new Key(clazz, null));
+  }
+
+  @SuppressWarnings("unchecked")
+  public <T> T removeAttachment(Class<T> clazz, String name)
+  {
+    return (T)attachments.remove(new Key(clazz, name));
+  }
+
+  public Object removeAttachment(String name)
+  {
+    return attachments.remove(new Key(null, name));
+  }
+  
+  public String toString()
+  {
+    return attachments.toString();
+  }
+}

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java (from rev 95093, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.deployer;
+
+//$Id$
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.osgi.framework.BundleException;
+
+/**
+ * A Service that can be used to deploy/undeploy bundles or archives to/from the runtime.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface DeployerService
+{
+   /**
+    * The object name under which this is registered: 'jboss.osgi:service=DeployerService'
+    */
+   ObjectName MBEAN_DEPLOYER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=DeployerService");
+
+   /** 
+    * Create a deployment from the given location. 
+    */
+   Deployment createDeployment(String location) throws BundleException;
+   
+   /**
+    * Deploy an array of bundles
+    */
+   void deploy(Deployment[] bundleDeps) throws BundleException;
+
+   /**
+    * Undeploy an array of bundles
+    */
+   void undeploy(Deployment[] bundleDeps) throws BundleException;
+
+   /**
+    * Deploy bundle from URL
+    */
+   void deploy(URL url) throws BundleException;
+
+   /**
+    * Undeploy bundle from URL.
+    * 
+    * Note, due to the dynamic nature of OSGi services it is 
+    * possible that a {@link DeployerService} is asked to undeploy 
+    * a bundle URL which it did not deploy itself.
+    * 
+    * In this case this method should return false, so that  
+    * another {@link DeployerService} can be tried.
+    * 
+    * @return true if this service could undeploy the bundle
+    */
+   boolean undeploy(URL url) throws BundleException;
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceBase.java (from rev 95093, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeployerServiceBase.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceBase.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceBase.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.deployer;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.jar.Attributes;
+import java.util.jar.JarFile;
+import java.util.jar.Manifest;
+
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.internal.DeploymentImpl;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.Constants;
+
+//$Id$
+
+/**
+ * An abstract base implementation of the DeployerService.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 16-Oct-2009
+ */
+public abstract class DeployerServiceBase implements DeployerService
+{
+   public Deployment createDeployment(String location) throws BundleException
+   {
+      // Try location as URL
+      URL url = null;
+      try
+      {
+         url = new URL(location);
+      }
+      catch (MalformedURLException ex)
+      {
+         // ignore
+      }
+
+      // Try location as File
+      if (url == null)
+      {
+         try
+         {
+            File file = new File(location);
+            if (file.exists())
+               url = file.toURI().toURL();
+         }
+         catch (MalformedURLException e)
+         {
+            // ignore
+         }
+      }
+      
+      if (url == null)
+         throw new IllegalArgumentException("Invalid bundle location: " + location);
+
+      return createDeploymentInternal(url);
+   }
+
+   private Deployment createDeploymentInternal(URL url) throws BundleException
+   {
+      Manifest manifest;
+      try
+      {
+         JarFile jarFile = new JarFile(url.getPath());
+         manifest = jarFile.getManifest();
+         jarFile.close();
+      }
+      catch (IOException ex)
+      {
+         throw new BundleException("Cannot get manifest from: " + url);
+
+      }
+
+      Attributes attribs = manifest.getMainAttributes();
+      String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+      if (symbolicName == null)
+         throw new BundleException("Cannot obtain Bundle-SymbolicName for: " + url);
+
+      String version = attribs.getValue(Constants.BUNDLE_VERSION);
+      return new DeploymentImpl(url, symbolicName, version);
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java (from rev 95093, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentServiceCapability.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeployerServiceCapability.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.deployer;
+
+//$Id$
+
+import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+
+/**
+ * Adds the DeploymentService capability to the {@link OSGiRuntime}
+ * under test. 
+ * 
+ * It is ignored if the {@link DeployerService} is already registered.
+ * 
+ * Installed bundles: jboss-osgi-deployment.jar
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 16-Oct-2009
+ */
+public class DeployerServiceCapability extends Capability
+{
+   public DeployerServiceCapability()
+   {
+      super(DeployerService.class.getName());
+      
+      addBundle("bundles/jboss-osgi-deployment.jar");
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentRegistryService.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentRegistryService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentRegistryService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/deployer/DeploymentRegistryService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.deployer;
+
+//$Id: DeployerService.java 90894 2009-07-07 11:58:40Z thomas.diesler at jboss.com $
+
+import java.net.URL;
+
+import org.jboss.osgi.deployment.common.Deployment;
+import org.osgi.framework.Version;
+
+/**
+ * A Service to register/unregister bundle deployments.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 08-Jul-2009
+ */
+public interface DeploymentRegistryService
+{
+   /**
+    * Create a bundle deployment from the given bundle URL
+    * @return null, if this service does not maintain the bundle deployment
+    */
+   Deployment getBundleDeployment(URL url);
+   
+   /**
+    * Get the bundle deployment for the given bundle symbolicName and version
+    * @return null, if this service does not maintain the bundle deployment
+    */
+   Deployment getBundleDeployment(String symbolicName, Version version);
+
+   /**
+    * Register a bundle deployment
+    */
+   void registerBundleDeployment(Deployment dep);
+   
+   /**
+    * Unregister a bundle deployment
+    */
+   void unregisterBundleDeployment(Deployment dep);
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptor.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptor.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptor.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptor.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.interceptor;
+
+import org.jboss.osgi.deployment.common.Deployment;
+
+//$Id$
+
+
+/**
+ * An OSGi deployer
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface DeploymentInterceptor
+{
+   enum Phase { 
+      BEFORE_INSTALLED, 
+      AFTER_INSTALLED,
+      BEFORE_RESOLVED, 
+      AFTER_RESOLVED,
+      BEFORE_ACTIVE, 
+      AFTER_ACTIVE
+   }
+   
+   void deploy(Deployment dep);
+   
+   void undeploy(Deployment dep);
+}
\ No newline at end of file

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptorService.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentInterceptorService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptorService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/interceptor/DeploymentInterceptorService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.interceptor;
+
+
+//$Id$
+
+
+/**
+ * The deployers service
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface DeploymentInterceptorService
+{
+   void addInterceptor(DeploymentInterceptor deployer);
+   
+   void removeInterceptor(DeploymentInterceptor deployer);
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentImpl.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -24,8 +24,8 @@
 import java.io.Serializable;
 import java.net.URL;
 
-import org.jboss.osgi.deployment.DeploymentBase;
-import org.jboss.osgi.deployment.Deployment;
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.common.DeploymentBase;
 
 //$Id$
 

Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentRegistryServiceImpl.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -27,9 +27,9 @@
 import java.util.HashSet;
 import java.util.Set;
 
-import org.jboss.osgi.deployment.Deployment;
-import org.jboss.osgi.deployment.DeployerService;
-import org.jboss.osgi.deployment.DeploymentRegistryService;
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Version;
 

Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/DeploymentServicesActivator.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -29,10 +29,10 @@
 import javax.management.MBeanServer;
 import javax.management.StandardMBean;
 
-import org.jboss.osgi.deployment.DeployerService;
-import org.jboss.osgi.deployment.DeploymentInterceptor;
-import org.jboss.osgi.deployment.DeploymentInterceptorService;
-import org.jboss.osgi.deployment.DeploymentRegistryService;
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
+import org.jboss.osgi.deployment.interceptor.DeploymentInterceptor;
+import org.jboss.osgi.deployment.interceptor.DeploymentInterceptorService;
 import org.jboss.osgi.spi.NotImplementedException;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;

Modified: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/internal/SystemDeployerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -30,10 +30,10 @@
 import java.util.Map;
 import java.util.Map.Entry;
 
-import org.jboss.osgi.deployment.Deployment;
-import org.jboss.osgi.deployment.DeployerService;
-import org.jboss.osgi.deployment.DeployerServiceBase;
-import org.jboss.osgi.deployment.DeploymentRegistryService;
+import org.jboss.osgi.deployment.common.Deployment;
+import org.jboss.osgi.deployment.deployer.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeployerServiceBase;
+import org.jboss.osgi.deployment.deployer.DeploymentRegistryService;
 import org.jboss.osgi.spi.logging.ExportedPackageHelper;
 import org.jboss.osgi.spi.management.ManagedBundleService;
 import org.osgi.framework.Bundle;

Copied: projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/DeploymentScannerService.java (from rev 95091, projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/DeploymentScannerService.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/DeploymentScannerService.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/reactor/deployment/src/main/java/org/jboss/osgi/deployment/scanner/DeploymentScannerService.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt 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.osgi.deployment.scanner;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.osgi.deployment.common.Deployment;
+
+
+/**
+ * A service that scans a directory location for new/removed bundles.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public interface DeploymentScannerService
+{
+   /**
+    * The property that names the scan location: org.jboss.osgi.hotdeploy.scandir
+    */
+   String PROPERTY_SCAN_LOCATION = "org.jboss.osgi.hotdeploy.scandir";
+   
+   /**
+    * The property to defines the scan interval: org.jboss.osgi.hotdeploy.interval
+    */
+   String PROPERTY_SCAN_INTERVAL = "org.jboss.osgi.hotdeploy.interval";
+   
+   /**
+    * Get the scan location URL.
+    *  
+    * This is can be specified by setting the {@link #PROPERTY_SCAN_LOCATION} property. 
+    */
+   URL getScanLocation();
+   
+   /**
+    * The number of scans since the service started 
+    */
+   long getScanCount();
+   
+   /**
+    * The number of milliseconds between scans
+    * Defaults to 2000ms 
+    */
+   long getScanInterval();
+   
+   /**
+    * The timestamp of the last change
+    */
+   long getLastChange();
+   
+   /**
+    * Run a directory scan
+    */
+   void scan();
+   
+   /**
+    * Returns the array of bundles currently known to the deployemtn scanner. 
+    */
+   Deployment[] getBundleDeployments();
+}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-10-19 07:51:36 UTC (rev 95095)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-10-19 08:13:35 UTC (rev 95096)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import static org.jboss.osgi.deployment.DeployerService.MBEAN_DEPLOYER_SERVICE;
+import static org.jboss.osgi.deployment.deployer.DeployerService.MBEAN_DEPLOYER_SERVICE;
 import static org.jboss.osgi.spi.management.ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK;
 import static org.jboss.osgi.spi.management.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
 import static org.jboss.test.osgi.service.microcontainer.bundleB.SomeBeanMBean.MBEAN_NAME;
@@ -36,7 +36,7 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.osgi.deployment.DeployerService;
+import org.jboss.osgi.deployment.deployer.DeployerService;
 import org.jboss.osgi.jbossxb.XMLBindingCapability;
 import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.jndi.JNDICapability;




More information about the jboss-cvs-commits mailing list