[jboss-cvs] JBossAS SVN: r89584 - in projects/jboss-osgi/branches/tdiesler: bundles/common and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Jun 1 01:41:53 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-06-01 01:41:53 -0400 (Mon, 01 Jun 2009)
New Revision: 89584

Added:
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/AbstractMicrocontainerService.java
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/BundleInfo.java
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/DeployerService.java
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java
   projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerServiceMBean.java
Removed:
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/BundleInfo.java
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerService.java
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java
   projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java
   projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/AbstractMicrocontainerService.java
Modified:
   projects/jboss-osgi/branches/tdiesler/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
   projects/jboss-osgi/branches/tdiesler/bundles/common/pom.xml
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/SystemDeployerService.java
   projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java
   projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/pom.xml
   projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScannerService.java
   projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java
   projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
   projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java
   projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
   projects/jboss-osgi/branches/tdiesler/husky/testsuite/src/test/resources/jboss-osgi-felix.properties
   projects/jboss-osgi/branches/tdiesler/integration/jbossas/src/main/java/org/jboss/osgi/jbossas/integration/MicrocontainerServiceBean.java
   projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
   projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
   projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/jboss-osgi-felix.properties
   projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
   projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
   projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties
Log:
WIP

Modified: projects/jboss-osgi/branches/tdiesler/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/blueprint/testsuite/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:41:53 UTC (rev 89584)
@@ -19,6 +19,7 @@
 	org.jboss.logging, \
   	org.jboss.osgi.spi;version=1.0, \
   	org.jboss.osgi.spi.management;version=1.0, \
+  	org.jboss.osgi.spi.service;version=1.0, \
   	org.jboss.osgi.spi.testing;version=1.0, \
   	org.jboss.osgi.spi.testing.capability;version=1.0, \
   	org.jboss.virtual, \

Modified: projects/jboss-osgi/branches/tdiesler/bundles/common/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/pom.xml	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/pom.xml	2009-06-01 05:41:53 UTC (rev 89584)
@@ -62,6 +62,7 @@
                javax.management, 
                org.jboss.logging,
                org.jboss.osgi.spi.management;version="1.0",
+               org.jboss.osgi.spi.service;version="1.0",
                org.osgi.framework;version=1.4,
                org.osgi.service.log;version=1.3,
                org.osgi.util.tracker

Modified: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/AbstractCommonServicesActivator.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -29,8 +29,8 @@
 import javax.management.MBeanServer;
 import javax.management.StandardMBean;
 
-import org.jboss.osgi.common.service.DeployerService;
 import org.jboss.osgi.common.service.DeployerServiceDelegate;
+import org.jboss.osgi.spi.service.DeployerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogReaderService;

Modified: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/SystemDeployerService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/SystemDeployerService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/internal/SystemDeployerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -30,9 +30,9 @@
 import java.util.Map;
 
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.common.service.BundleInfo;
-import org.jboss.osgi.common.service.DeployerService;
 import org.jboss.osgi.common.service.ManagedBundleService;
+import org.jboss.osgi.spi.service.BundleInfo;
+import org.jboss.osgi.spi.service.DeployerService;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;

Deleted: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/BundleInfo.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/BundleInfo.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/BundleInfo.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -1,64 +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.common.service;
-
-//$Id$
-
-import java.net.URL;
-
-
-/**
- * An abstraction of a bundle in the scan folder
- * 
- * @author thomas.diesler at jboss.com
- * @since 27-May-2009
- */
-public interface BundleInfo
-{
-   /**
-    * The state of the bundle
-    */
-   enum State
-   {
-      NEW, INSTALLED, ACTIVE, UNINSTALLED
-   }
-
-   /**
-    * Get the bundle location
-    */
-   URL getLocation();
-
-   /**
-    * Get the bundle state
-    */
-   BundleInfo.State getState();
-
-   /**
-    * Get the bundle symbolic name
-    */
-   String getSymbolicName();
-
-   /**
-    * Get the bundle version
-    */
-   String getVersion();
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -1,74 +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.common.service;
-
-import java.net.URL;
-
-import javax.management.ObjectName;
-
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-import org.osgi.framework.BundleException;
-
-//$Id$
-
-/**
- * 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");
-
-   /**
-    * Deploy an array of bundles
-    */
-   void deploy(BundleInfo[] bundles) throws BundleException;
-
-   /**
-    * Undeploy an array of bundles
-    */
-   void undeploy(BundleInfo[] bundles) 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 the 
-    * {@link DeployerServiceDelegate} can use another {@link DeployerService}
-    * 
-    * @return true if thhis service could undeploy the bundle
-    */
-   boolean undeploy(URL url) throws BundleException;
-}
\ No newline at end of file

Modified: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerServiceDelegate.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -26,6 +26,8 @@
 import java.net.URL;
 
 import org.jboss.osgi.common.log.LogServiceTracker;
+import org.jboss.osgi.spi.service.BundleInfo;
+import org.jboss.osgi.spi.service.DeployerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.BundleException;
 import org.osgi.framework.InvalidSyntaxException;

Deleted: projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -1,66 +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.common.service;
-
-//$Id$
-
-import java.util.List;
-
-/**
- * An OSGi Service the gives access to the Kernel and MBeanServer.
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface MicrocontainerService
-{
-   /*
-    * The name under which the system bundle context is registered: 'jboss.osgi:service=BundleContext'
-    */
-   String BEAN_SYSTEM_BUNDLE_CONTEXT = "jboss.osgi:service=BundleContext";
-
-   /*
-    * The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
-    */
-   String BEAN_MBEAN_SERVER = "jboss.osgi:service=MBeanServer";
-
-   /*
-    * The name under which the KernelController is registered: 'jboss.kernel:service=KernelController'
-    */
-   String BEAN_KERNEL_CONTROLLER = "jboss.kernel:service=KernelController";
-
-   /*
-    * The name under which the Kernel is registered: 'jboss.kernel:service=Kernel'
-    */
-   String BEAN_KERNEL = "jboss.kernel:service=Kernel";
-
-   /*
-    * * Get the list of registered beans.
-    */
-   List<String> getRegisteredBeans();
-
-   /*
-    * * Get a registered bean from the Kernel.
-    * @return null if there is no bean registered under this name
-    */
-   Object getRegisteredBean(String beanName);
-}
\ No newline at end of file

Modified: projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/pom.xml	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/pom.xml	2009-06-01 05:41:53 UTC (rev 89584)
@@ -19,6 +19,10 @@
 
   <!-- Dependencies -->
   <dependencies>
+    <dependency>
+      <groupId>org.jboss.osgi</groupId>
+      <artifactId>jboss-osgi-spi</artifactId>
+    </dependency>
     
     <!-- Bundle dependencies -->
     <dependency>
@@ -55,6 +59,7 @@
                javax.management, 
                org.jboss.osgi.common.log;version="1.0",
                org.jboss.osgi.common.service;version="1.0",
+               org.jboss.osgi.spi.service;version="1.0",
                org.osgi.framework,
                org.osgi.service.log,
                org.osgi.util.tracker

Modified: projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScannerService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScannerService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/DeploymentScannerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -25,7 +25,7 @@
 
 import java.net.URL;
 
-import org.jboss.osgi.common.service.BundleInfo;
+import org.jboss.osgi.spi.service.BundleInfo;
 
 
 /**

Modified: projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/BundleInfoImpl.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -26,7 +26,7 @@
 import java.net.URL;
 import java.util.Dictionary;
 
-import org.jboss.osgi.common.service.BundleInfo;
+import org.jboss.osgi.spi.service.BundleInfo;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.Constants;
 

Modified: projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/hotdeploy/src/main/java/org/jboss/osgi/service/hotdeploy/internal/DeploymentScannerImpl.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -35,10 +35,10 @@
 import java.util.jar.Manifest;
 
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.common.service.BundleInfo;
 import org.jboss.osgi.common.service.DeployerServiceDelegate;
-import org.jboss.osgi.common.service.BundleInfo.State;
 import org.jboss.osgi.service.hotdeploy.DeploymentScannerService;
+import org.jboss.osgi.spi.service.BundleInfo;
+import org.jboss.osgi.spi.service.BundleInfo.State;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Constants;

Deleted: projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -1,49 +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.microcontainer;
-
-//$Id$
-
-import java.util.List;
-
-import javax.management.ObjectName;
-
-import org.jboss.osgi.spi.management.ObjectNameFactory;
-
-/**
- * An OSGi Service the gives access to the Kernel and MBeanServer.
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public interface MicrocontainerServiceMBean
-{
-   /** 
-    * The object name under which the MicrocontainerService is registered: 'jboss.osgi:service=MicrocontainerService' 
-    */
-   ObjectName MBEAN_MICROCONTAINER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=MicrocontainerService");
-
-   /**
-    * Get the list of registered beans.
-    */
-   List<String> getRegisteredBeans();
-}
\ No newline at end of file

Deleted: projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/AbstractMicrocontainerService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/AbstractMicrocontainerService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/AbstractMicrocontainerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -1,286 +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.microcontainer.internal;
-
-//$Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.management.MBeanServer;
-import javax.management.StandardMBean;
-
-import org.jboss.dependency.plugins.AbstractController;
-import org.jboss.dependency.plugins.AbstractControllerContext;
-import org.jboss.dependency.plugins.AbstractControllerContextActions;
-import org.jboss.dependency.plugins.action.ControllerContextAction;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerContextActions;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.deployers.client.spi.main.MainDeployer;
-import org.jboss.deployers.vfs.spi.client.VFSDeployment;
-import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.dependency.KernelControllerContext;
-import org.jboss.osgi.common.service.BundleInfo;
-import org.jboss.osgi.common.service.DeployerService;
-import org.jboss.osgi.common.service.MicrocontainerService;
-import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
-import org.jboss.osgi.spi.NotImplementedException;
-import org.jboss.virtual.VFS;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.BundleException;
-
-/**
- * An OSGi Service the gives access to the Kernel.
- * 
- * @author thomas.diesler at jboss.com
- * @since 23-Jan-2009
- */
-public abstract class AbstractMicrocontainerService implements DeployerService, MicrocontainerService, MicrocontainerServiceMBean
-{
-   private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
-   private Map<URL, String> contextMap = Collections.synchronizedMap(new HashMap<URL, String>());
-   
-   public abstract Kernel getKernel();
-   
-   public abstract void logDebug(String message);
-   
-   public abstract void logWarning(String message, Exception ex);
-
-   public void logWarning(String message)
-   {
-      logWarning(message, null);
-   }
-   
-   public List<String> getRegisteredBeans()
-   {
-      List<String> names = new ArrayList<String>();
-
-      AbstractController controller = (AbstractController)getKernel().getController();
-      for (ControllerContext ctx : controller.getAllContexts())
-      {
-         if (ctx instanceof KernelControllerContext || ctx instanceof PreInstalledControllerContext)
-            names.add(ctx.getName().toString());
-      }
-
-      return names;
-   }
-
-   public Object getRegisteredBean(String beanName)
-   {
-      ControllerContext context = getKernel().getController().getInstalledContext(beanName);
-      return context != null ? context.getTarget() : null;
-   }
-
-   public void deploy(URL url) throws BundleException
-   {
-      BundleInfo info = new LocationOnlyBundleInfo(url);
-      deploy(new BundleInfo[] { info });
-   }
-
-   public boolean undeploy(URL url) throws BundleException
-   {
-      String deploymentName = contextMap.remove(url);
-      if (deploymentName == null)
-      {
-         logWarning("Package not deployed: " + url);
-         return false;
-      }
-
-      try
-      {
-         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
-         mainDeployer.removeDeployment(deploymentName);
-         mainDeployer.process();
-         return true;
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (Exception ex)
-      {
-         logWarning("Cannot undeploy bundle", ex);
-         return false;
-      }
-   }
-
-   public void deploy(BundleInfo[] bundles) throws BundleException
-   {
-      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
-      try
-      {
-         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
-
-         List<Deployment> deployments = new ArrayList<Deployment>();
-         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
-         for (BundleInfo bundle : bundles)
-         {
-            VirtualFile file = VFS.createNewRoot(bundle.getLocation());
-            VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
-            mainDeployer.addDeployment(deployment);
-            deployments.add(deployment);
-            contextMap.put(bundle.getLocation(), deployment.getName());
-         }
-
-         // Process the deployments
-         mainDeployer.process();
-
-         // Check for completeness
-         Deployment[] depArr = deployments.toArray(new Deployment[deployments.size()]);
-         mainDeployer.checkComplete(depArr);
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (Exception ex)
-      {
-         throw new BundleException("Cannot deploy bundles", ex);
-      }
-      finally
-      {
-         Thread.currentThread().setContextClassLoader(ctxLoader);
-      }
-   }
-
-   public void undeploy(BundleInfo[] bundles) throws BundleException
-   {
-      try
-      {
-         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
-         for (BundleInfo bundle : bundles)
-         {
-            String deploymentName = contextMap.remove(bundle.getLocation());
-            if (deploymentName != null)
-            {
-               mainDeployer.removeDeployment(deploymentName);
-            }
-            else
-            {
-               logWarning("Package not deployed: " + bundle.getLocation());
-            }
-         }
-         mainDeployer.process();
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (Exception ex)
-      {
-         logWarning("Cannot undeploy bundles", ex);
-      }
-   }
-
-   protected void installBean(KernelController controller, String beanName, Object beanImpl)
-   {
-      try
-      {
-         ControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
-         controller.install(new PreInstalledControllerContext(beanName, actions, beanImpl));
-      }
-      catch (RuntimeException rte)
-      {
-         throw rte;
-      }
-      catch (Throwable ex)
-      {
-         throw new IllegalStateException("Cannot register bean: " + beanName, ex);
-      }
-   }
-   
-   protected void registerMicrocontainerServiceMBean(MBeanServer mbeanServer)
-   {
-      try
-      {
-         logDebug("Register MicrocontainerServiceMBean");
-         StandardMBean mbean = new StandardMBean((MicrocontainerServiceMBean)this, MicrocontainerServiceMBean.class);
-         mbeanServer.registerMBean(mbean, MBEAN_MICROCONTAINER_SERVICE);
-      }
-      catch (Exception ex)
-      {
-         throw new IllegalStateException("Cannot register MicrocontainerServiceMBean", ex);
-      }
-   }
-
-   protected void unregisterMicrocontainerServiceMBean(MBeanServer mbeanServer)
-   {
-         if (mbeanServer.isRegistered(MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE))
-         {
-            try
-            {
-               logDebug("Unregister MicrocontainerServiceMBean");
-               mbeanServer.unregisterMBean(MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE);
-            }
-            catch (Exception ex)
-            {
-               logWarning("Cannot unregister MicrocontainerServiceMBean", ex);
-            }
-         }
-   }
-
-   static class PreInstalledControllerContext extends AbstractControllerContext
-   {
-      public PreInstalledControllerContext(Object name, ControllerContextActions actions, Object target)
-      {
-         super(name, actions, null, target);
-      }
-   }
-
-   static class LocationOnlyBundleInfo implements BundleInfo
-   {
-      private URL location;
-
-      public LocationOnlyBundleInfo(URL location)
-      {
-         this.location = location;
-      }
-
-      public URL getLocation()
-      {
-         return location;
-      }
-
-      public State getState()
-      {
-         throw new NotImplementedException();
-      }
-
-      public String getSymbolicName()
-      {
-         throw new NotImplementedException();
-      }
-
-      public String getVersion()
-      {
-         throw new NotImplementedException();
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.common.service.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 

Modified: projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -31,8 +31,10 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.common.service.DeployerService;
-import org.jboss.osgi.common.service.MicrocontainerService;
+import org.jboss.osgi.spi.service.AbstractMicrocontainerService;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerServiceMBean;
 import org.jboss.virtual.VFS;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
@@ -46,7 +48,7 @@
  * @author thomas.diesler at jboss.com
  * @since 23-Jan-2009
  */
-public class MicrocontainerServiceImpl extends AbstractMicrocontainerService
+public class MicrocontainerServiceImpl extends AbstractMicrocontainerService implements MicrocontainerServiceMBean
 {
    private BundleContext context;
    private EmbeddedBeansDeployer deployer;

Modified: projects/jboss-osgi/branches/tdiesler/husky/testsuite/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/husky/testsuite/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/husky/testsuite/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:41:53 UTC (rev 89584)
@@ -23,6 +23,7 @@
 	org.jboss.logging, \
   	org.jboss.osgi.spi;version=1.0, \
   	org.jboss.osgi.spi.management;version=1.0, \
+  	org.jboss.osgi.spi.service;version=1.0, \
   	org.jboss.osgi.spi.testing;version=1.0, \
   	org.jboss.osgi.spi.testing.capability;version=1.0, \
   	org.osgi.framework;version=1.4

Modified: projects/jboss-osgi/branches/tdiesler/integration/jbossas/src/main/java/org/jboss/osgi/jbossas/integration/MicrocontainerServiceBean.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/integration/jbossas/src/main/java/org/jboss/osgi/jbossas/integration/MicrocontainerServiceBean.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/integration/jbossas/src/main/java/org/jboss/osgi/jbossas/integration/MicrocontainerServiceBean.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -30,9 +30,10 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.logging.Logger;
-import org.jboss.osgi.common.service.DeployerService;
-import org.jboss.osgi.common.service.MicrocontainerService;
-import org.jboss.osgi.microcontainer.internal.AbstractMicrocontainerService;
+import org.jboss.osgi.spi.service.AbstractMicrocontainerService;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerServiceMBean;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -42,7 +43,7 @@
  * @author thomas.diesler at jboss.com
  * @since 05-May-2009
  */
-public class MicrocontainerServiceBean extends AbstractMicrocontainerService
+public class MicrocontainerServiceBean extends AbstractMicrocontainerService implements MicrocontainerServiceMBean
 {
    private static Logger log = Logger.getLogger(MicrocontainerServiceBean.class);
 

Copied: projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/AbstractMicrocontainerService.java (from rev 89579, projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/internal/AbstractMicrocontainerService.java)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/AbstractMicrocontainerService.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/AbstractMicrocontainerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -0,0 +1,261 @@
+/*
+ * 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.spi.service;
+
+//$Id$
+
+import static org.jboss.osgi.spi.service.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.management.MBeanServer;
+import javax.management.StandardMBean;
+
+import org.jboss.dependency.plugins.AbstractController;
+import org.jboss.dependency.plugins.AbstractControllerContext;
+import org.jboss.dependency.plugins.AbstractControllerContextActions;
+import org.jboss.dependency.plugins.action.ControllerContextAction;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerContextActions;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.deployers.client.spi.Deployment;
+import org.jboss.deployers.client.spi.main.MainDeployer;
+import org.jboss.deployers.vfs.spi.client.VFSDeployment;
+import org.jboss.deployers.vfs.spi.client.VFSDeploymentFactory;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.dependency.KernelControllerContext;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleException;
+
+/**
+ * An OSGi Service the gives access to the Kernel.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public abstract class AbstractMicrocontainerService implements DeployerService, MicrocontainerService
+{
+   private VFSDeploymentFactory deploymentFactory = VFSDeploymentFactory.getInstance();
+   private Map<URL, String> contextMap = Collections.synchronizedMap(new HashMap<URL, String>());
+
+   public abstract Kernel getKernel();
+
+   public abstract void logDebug(String message);
+
+   public abstract void logWarning(String message, Exception ex);
+
+   public void logWarning(String message)
+   {
+      logWarning(message, null);
+   }
+
+   public List<String> getRegisteredBeans()
+   {
+      List<String> names = new ArrayList<String>();
+
+      AbstractController controller = (AbstractController)getKernel().getController();
+      for (ControllerContext ctx : controller.getAllContexts())
+      {
+         if (ctx instanceof KernelControllerContext || ctx instanceof PreInstalledControllerContext)
+            names.add(ctx.getName().toString());
+      }
+
+      return names;
+   }
+
+   public Object getRegisteredBean(String beanName)
+   {
+      ControllerContext context = getKernel().getController().getInstalledContext(beanName);
+      return context != null ? context.getTarget() : null;
+   }
+
+   public void deploy(URL url) throws BundleException
+   {
+      deployInternal(new URL[] { url });
+   }
+
+   public boolean undeploy(URL url) throws BundleException
+   {
+      String deploymentName = contextMap.remove(url);
+      if (deploymentName == null)
+      {
+         logWarning("Package not deployed: " + url);
+         return false;
+      }
+
+      try
+      {
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         mainDeployer.removeDeployment(deploymentName);
+         mainDeployer.process();
+         return true;
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         logWarning("Cannot undeploy bundle", ex);
+         return false;
+      }
+   }
+
+   public void deploy(BundleInfo[] bundles) throws BundleException
+   {
+      URL[] urls = new URL[bundles.length];
+      for (int i = 0; i < bundles.length; i++)
+         urls[i] = bundles[i].getLocation();
+      
+      deployInternal(urls);
+   }
+
+   private void deployInternal(URL[] urls) throws BundleException
+   {
+      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+         List<Deployment> deployments = new ArrayList<Deployment>();
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         for (URL location : urls)
+         {
+            VirtualFile file = VFS.createNewRoot(location);
+            VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
+            mainDeployer.addDeployment(deployment);
+            deployments.add(deployment);
+            contextMap.put(location, deployment.getName());
+         }
+
+         // Process the deployments
+         mainDeployer.process();
+
+         // Check for completeness
+         Deployment[] depArr = deployments.toArray(new Deployment[deployments.size()]);
+         mainDeployer.checkComplete(depArr);
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BundleException("Cannot deploy bundles", ex);
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(ctxLoader);
+      }
+   }
+
+   public void undeploy(BundleInfo[] bundles) throws BundleException
+   {
+      try
+      {
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         for (BundleInfo bundle : bundles)
+         {
+            String deploymentName = contextMap.remove(bundle.getLocation());
+            if (deploymentName != null)
+            {
+               mainDeployer.removeDeployment(deploymentName);
+            }
+            else
+            {
+               logWarning("Package not deployed: " + bundle.getLocation());
+            }
+         }
+         mainDeployer.process();
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         logWarning("Cannot undeploy bundles", ex);
+      }
+   }
+
+   protected void installBean(KernelController controller, String beanName, Object beanImpl)
+   {
+      try
+      {
+         ControllerContextActions actions = new AbstractControllerContextActions(new HashMap<ControllerState, ControllerContextAction>());
+         controller.install(new PreInstalledControllerContext(beanName, actions, beanImpl));
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Throwable ex)
+      {
+         throw new IllegalStateException("Cannot register bean: " + beanName, ex);
+      }
+   }
+
+   protected void registerMicrocontainerServiceMBean(MBeanServer mbeanServer)
+   {
+      try
+      {
+         logDebug("Register MicrocontainerServiceMBean");
+         StandardMBean mbean = new StandardMBean((MicrocontainerServiceMBean)this, MicrocontainerServiceMBean.class);
+         mbeanServer.registerMBean(mbean, MBEAN_MICROCONTAINER_SERVICE);
+      }
+      catch (Exception ex)
+      {
+         throw new IllegalStateException("Cannot register MicrocontainerServiceMBean", ex);
+      }
+   }
+
+   protected void unregisterMicrocontainerServiceMBean(MBeanServer mbeanServer)
+   {
+      if (mbeanServer.isRegistered(MBEAN_MICROCONTAINER_SERVICE))
+      {
+         try
+         {
+            logDebug("Unregister MicrocontainerServiceMBean");
+            mbeanServer.unregisterMBean(MBEAN_MICROCONTAINER_SERVICE);
+         }
+         catch (Exception ex)
+         {
+            logWarning("Cannot unregister MicrocontainerServiceMBean", ex);
+         }
+      }
+   }
+
+   static class PreInstalledControllerContext extends AbstractControllerContext
+   {
+      public PreInstalledControllerContext(Object name, ControllerContextActions actions, Object target)
+      {
+         super(name, actions, null, target);
+      }
+   }
+}
\ No newline at end of file

Copied: projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/BundleInfo.java (from rev 89579, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/BundleInfo.java)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/BundleInfo.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/BundleInfo.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -0,0 +1,64 @@
+/*
+ * 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.spi.service;
+
+//$Id$
+
+import java.net.URL;
+
+
+/**
+ * An abstraction of a bundle in the scan folder
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 27-May-2009
+ */
+public interface BundleInfo
+{
+   /**
+    * The state of the bundle
+    */
+   enum State
+   {
+      NEW, INSTALLED, ACTIVE, UNINSTALLED
+   }
+
+   /**
+    * Get the bundle location
+    */
+   URL getLocation();
+
+   /**
+    * Get the bundle state
+    */
+   State getState();
+
+   /**
+    * Get the bundle symbolic name
+    */
+   String getSymbolicName();
+
+   /**
+    * Get the bundle version
+    */
+   String getVersion();
+}
\ No newline at end of file

Copied: projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/DeployerService.java (from rev 89579, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/DeployerService.java)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/DeployerService.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/DeployerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -0,0 +1,74 @@
+/*
+ * 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.spi.service;
+
+import java.net.URL;
+
+import javax.management.ObjectName;
+
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+import org.osgi.framework.BundleException;
+
+//$Id$
+
+/**
+ * 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");
+
+   /**
+    * Deploy an array of bundles
+    */
+   void deploy(BundleInfo[] bundles) throws BundleException;
+
+   /**
+    * Undeploy an array of bundles
+    */
+   void undeploy(BundleInfo[] bundles) 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 the 
+    * {@link DeployerServiceDelegate} can use another {@link DeployerService}
+    * 
+    * @return true if thhis service could undeploy the bundle
+    */
+   boolean undeploy(URL url) throws BundleException;
+}
\ No newline at end of file

Copied: projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java (from rev 89579, projects/jboss-osgi/trunk/bundles/common/src/main/java/org/jboss/osgi/common/service/MicrocontainerService.java)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -0,0 +1,66 @@
+/*
+ * 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.spi.service;
+
+//$Id$
+
+import java.util.List;
+
+/**
+ * An OSGi Service the gives access to the Kernel and MBeanServer.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface MicrocontainerService
+{
+   /*
+    * The name under which the system bundle context is registered: 'jboss.osgi:service=BundleContext'
+    */
+   String BEAN_SYSTEM_BUNDLE_CONTEXT = "jboss.osgi:service=BundleContext";
+
+   /*
+    * The name under which the MBeanServer is registered: 'jboss.osgi:service=MBeanServer'
+    */
+   String BEAN_MBEAN_SERVER = "jboss.osgi:service=MBeanServer";
+
+   /*
+    * The name under which the KernelController is registered: 'jboss.kernel:service=KernelController'
+    */
+   String BEAN_KERNEL_CONTROLLER = "jboss.kernel:service=KernelController";
+
+   /*
+    * The name under which the Kernel is registered: 'jboss.kernel:service=Kernel'
+    */
+   String BEAN_KERNEL = "jboss.kernel:service=Kernel";
+
+   /*
+    * * Get the list of registered beans.
+    */
+   List<String> getRegisteredBeans();
+
+   /*
+    * * Get a registered bean from the Kernel.
+    * @return null if there is no bean registered under this name
+    */
+   Object getRegisteredBean(String beanName);
+}
\ No newline at end of file

Copied: projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerServiceMBean.java (from rev 89579, projects/jboss-osgi/trunk/bundles/microcontainer/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerServiceMBean.java)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerServiceMBean.java	                        (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/spi/src/main/java/org/jboss/osgi/spi/service/MicrocontainerServiceMBean.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -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.spi.service;
+
+//$Id$
+
+import java.util.List;
+
+import javax.management.ObjectName;
+
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+
+/**
+ * An OSGi Service the gives access to the Kernel and MBeanServer.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 23-Jan-2009
+ */
+public interface MicrocontainerServiceMBean
+{
+   /** 
+    * The object name under which the MicrocontainerService is registered: 'jboss.osgi:service=MicrocontainerService' 
+    */
+   ObjectName MBEAN_MICROCONTAINER_SERVICE = ObjectNameFactory.create("jboss.osgi:service=MicrocontainerService");
+
+   /**
+    * Get the list of registered beans.
+    */
+   List<String> getRegisteredBeans();
+}
\ No newline at end of file

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -23,12 +23,12 @@
 
 //$Id$
 
-import static org.jboss.osgi.common.service.DeployerService.MBEAN_DEPLOYER_SERVICE;
-import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_KERNEL;
-import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_MBEAN_SERVER;
-import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
-import static org.jboss.osgi.microcontainer.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
 import static org.jboss.osgi.spi.management.ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK;
+import static org.jboss.osgi.spi.service.DeployerService.MBEAN_DEPLOYER_SERVICE;
+import static org.jboss.osgi.spi.service.MicrocontainerService.BEAN_KERNEL;
+import static org.jboss.osgi.spi.service.MicrocontainerService.BEAN_MBEAN_SERVER;
+import static org.jboss.osgi.spi.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+import static org.jboss.osgi.spi.service.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
@@ -37,10 +37,10 @@
 
 import javax.management.ObjectName;
 
-import org.jboss.osgi.common.service.DeployerService;
-import org.jboss.osgi.microcontainer.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.management.MBeanProxy;
 import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.jboss.osgi.spi.service.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java	2009-06-01 05:41:53 UTC (rev 89584)
@@ -23,9 +23,9 @@
 
 //$Id$
 
-import static org.jboss.osgi.common.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
+import static org.jboss.osgi.spi.service.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
 
-import org.jboss.osgi.common.service.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:41:53 UTC (rev 89584)
@@ -22,6 +22,7 @@
   	org.jboss.osgi.spi;version=1.0, \
   	org.jboss.osgi.spi.logging;version=1.0, \
   	org.jboss.osgi.spi.management;version=1.0, \
+  	org.jboss.osgi.spi.service;version=1.0, \
   	org.jboss.virtual, \
   	org.jboss.virtual.plugins.registry, \
   	org.jboss.virtual.plugins.context.jar, \

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd	2009-06-01 05:41:53 UTC (rev 89584)
@@ -6,4 +6,4 @@
 
 Export-Package: org.jboss.test.osgi.example.microcontainer.bundleA
 
-Import-Package: org.jboss.osgi.common.service, org.osgi.framework
+Import-Package: org.jboss.osgi.spi.service, org.osgi.framework

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:41:53 UTC (rev 89584)
@@ -21,6 +21,7 @@
   	org.jboss.osgi.spi;version=1.0, \
   	org.jboss.osgi.spi.logging;version=1.0, \
   	org.jboss.osgi.spi.management;version=1.0, \
+  	org.jboss.osgi.spi.service;version=1.0, \
   	org.jboss.virtual, \
   	org.jboss.virtual.plugins.registry, \
   	org.jboss.virtual.plugins.context.jar, \
@@ -33,13 +34,6 @@
     org.jboss.util.threadpool, \
     org.jboss.util.propertyeditor 
 
-# These are needed by jboss-remoting
-#   org.apache.log4j, \
-#   org.jboss.util, \
-#   org.jboss.util.id, \
-#   org.jboss.util.threadpool, \
-#   org.jboss.util.propertyeditor 
-
 # Bundles that need to be installed with the Framework automatically 
 # org.jboss.osgi.spi.framework.autoInstall=
 

Modified: projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:40:58 UTC (rev 89583)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/src/test/resources/jboss-osgi-felix.properties	2009-06-01 05:41:53 UTC (rev 89584)
@@ -18,9 +18,10 @@
 org.osgi.framework.system.packages.extra=\
 	org.jboss.logging, \
   	org.jboss.net.protocol, \
-  	org.jboss.osgi.spi, \
-  	org.jboss.osgi.spi.logging, \
-  	org.jboss.osgi.spi.management, \
+  	org.jboss.osgi.spi;version=1.0, \
+  	org.jboss.osgi.spi.logging;version=1.0, \
+  	org.jboss.osgi.spi.management;version=1.0, \
+  	org.jboss.osgi.spi.service;version=1.0, \
   	org.jboss.virtual, \
   	org.jboss.virtual.plugins.registry, \
   	org.jboss.virtual.plugins.context.jar, \
@@ -33,13 +34,6 @@
     org.jboss.util.threadpool, \
     org.jboss.util.propertyeditor 
 
-# These are needed by jboss-remoting
-#   org.apache.log4j, \
-#   org.jboss.util, \
-#   org.jboss.util.id, \
-#   org.jboss.util.threadpool, \
-#   org.jboss.util.propertyeditor 
-
 # Bundles that need to be installed with the Framework automatically 
 org.jboss.osgi.spi.framework.autoInstall=\
 	file://${test.archive.directory}/bundles/org.osgi.compendium.jar




More information about the jboss-cvs-commits mailing list