[jboss-osgi-commits] JBoss-OSGI SVN: r91057 - in projects/jboss-osgi/projects: bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer and 3 other directories.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Fri Jul 10 06:02:22 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-07-10 06:02:21 -0400 (Fri, 10 Jul 2009)
New Revision: 91057

Added:
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/
   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/MicrocontainerServiceBean.java
Removed:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java
Modified:
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
   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/internal/MicrocontainerServiceActivator.java
   projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java
Log:
Move MicrocontainerService to mc bundle

Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml	2009-07-10 09:56:10 UTC (rev 91056)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/pom.xml	2009-07-10 10:02:21 UTC (rev 91057)
@@ -22,7 +22,6 @@
     <version.jboss.deployers>2.0.5.SP1</version.jboss.deployers>
     <version.jboss.microcontainer>2.0.5.GA</version.jboss.microcontainer>
     <version.jboss.osgi.deployers>1.0.0-SNAPSHOT</version.jboss.osgi.deployers>
-    <version.jboss.osgi.jbossas>1.0.0-SNAPSHOT</version.jboss.osgi.jbossas>
     <version.jboss.osgi.jmx>1.0.0-SNAPSHOT</version.jboss.osgi.jmx>
     <version.jboss.osgi.xml.binding>2.0.1-SNAPSHOT</version.jboss.osgi.xml.binding>
     <version.osgi>r4v41</version.osgi>
@@ -56,11 +55,6 @@
       <artifactId>jboss-osgi-deployers</artifactId>
       <version>${version.jboss.osgi.deployers}</version>
     </dependency>
-    <dependency>
-      <groupId>org.jboss.osgi</groupId>
-      <artifactId>jboss-osgi-integration-jbossas</artifactId>
-      <version>${version.jboss.osgi.jbossas}</version>
-    </dependency>
     
     <!-- Provided Dependencies -->
     <dependency>
@@ -91,6 +85,7 @@
               org.jboss.osgi.microcontainer;version=${version}
             </Export-Package>
             <Private-Package>
+              org.jboss.osgi.microcontainer.integration,
               org.jboss.osgi.microcontainer.internal
             </Private-Package>
             <Import-Package>
@@ -151,7 +146,6 @@
               jboss-metatype;inline=false,
               jboss-mdr;inline=false,
               jboss-osgi-deployers;inline=false,
-              jboss-osgi-integration-jbossas;inline=false,
               jboss-kernel;inline=false,
             </Embed-Dependency>
             <_exportcontents>

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-07-10 09:56:10 UTC (rev 91056)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerCapability.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -26,7 +26,6 @@
 import org.jboss.osgi.jbossxb.XMLBindingCapability;
 import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 
 /**

Copied: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java (from rev 91048, projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/MicrocontainerService.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -0,0 +1,72 @@
+/*
+ * 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;
+
+/**
+ * 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);
+
+   /*
+    * Get a registered bean from the Kernel.
+    * @return null if there is no bean registered under this name
+    */
+   <T> T getRegisteredBean(Class<T> clazz, String beanName);
+}
\ No newline at end of file

Copied: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java (from rev 91048, projects/jboss-osgi/projects/integration/jbossas/trunk/src/main/java/org/jboss/osgi/integration/jbossas/AbstractMicrocontainerService.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/AbstractMicrocontainerService.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -0,0 +1,277 @@
+/*
+ * 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.integration;
+
+//$Id$
+
+import static org.jboss.osgi.spi.management.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
+
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
+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.spi.attachments.MutableAttachments;
+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.microcontainer.MicrocontainerService;
+import org.jboss.osgi.spi.Constants;
+import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.jboss.osgi.spi.service.DeploymentRegistryService;
+import org.jboss.osgi.spi.util.BundleDeployment;
+import org.jboss.osgi.spi.util.BundleDeploymentFactory;
+import org.jboss.virtual.VFS;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * 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 ServiceTracker registryTracker;
+
+   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;
+   }
+
+   @SuppressWarnings("unchecked")
+   public <T> T getRegisteredBean(Class<T> clazz, String beanName)
+   {
+      return (T)getRegisteredBean(beanName);
+   }
+
+   public void deploy(URL url) throws BundleException
+   {
+      BundleDeployment dep = BundleDeploymentFactory.createBundleDeployment(url);
+      deploy(new BundleDeployment[] { dep });
+   }
+
+   public boolean undeploy(URL url) throws BundleException
+   {
+      DeploymentRegistryService registry = getDeploymentRegistry();
+      BundleDeployment dep = registry.getBundleDeployment(url);
+      if (dep == null)
+      {
+         logWarning("Package not deployed: " + url);
+         return false;
+      }
+
+      try
+      {
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         mainDeployer.removeDeployment((String)dep.getMetadata());
+         mainDeployer.process();
+         return true;
+      }
+      catch (Exception ex)
+      {
+         logWarning("Cannot undeploy bundle", ex);
+         return false;
+      }
+   }
+
+   public void deploy(BundleDeployment[] depArr) throws BundleException
+   {
+      ClassLoader ctxLoader = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
+
+         List<Deployment> depList = new ArrayList<Deployment>();
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         DeploymentRegistryService registry = getDeploymentRegistry();
+         
+         for (BundleDeployment dep : depArr)
+         {
+            VirtualFile file = VFS.createNewRoot(dep.getLocation());
+            VFSDeployment deployment = deploymentFactory.createVFSDeployment(file);
+            dep.setMetadata(deployment.getName());
+            registry.registerBundleDeployment(dep);
+            depList.add(deployment);
+            
+            MutableAttachments att = (MutableAttachments)deployment.getPredeterminedManagedObjects();
+            att.addAttachment(Constants.PROPERTY_START_LEVEL, new Integer(dep.getStartLevel()));
+            att.addAttachment(Constants.PROPERTY_AUTO_START, new Boolean(dep.isAutoStart()));
+            
+            mainDeployer.addDeployment(deployment);
+         }
+
+         // Process the deployments
+         mainDeployer.process();
+
+         // Check for completeness
+         Deployment[] deploymentArr = depList.toArray(new Deployment[depList.size()]);
+         mainDeployer.checkComplete(deploymentArr);
+      }
+      catch (RuntimeException rte)
+      {
+         throw rte;
+      }
+      catch (Exception ex)
+      {
+         throw new BundleException("Cannot deploy bundles", ex);
+      }
+      finally
+      {
+         Thread.currentThread().setContextClassLoader(ctxLoader);
+      }
+   }
+
+   public void undeploy(BundleDeployment[] depArr) throws BundleException
+   {
+      try
+      {
+         MainDeployer mainDeployer = (MainDeployer)getRegisteredBean("MainDeployer");
+         DeploymentRegistryService registry = getDeploymentRegistry();
+         
+         for (BundleDeployment dep : depArr)
+         {
+            registry.unregisterBundleDeployment(dep);
+            mainDeployer.removeDeployment((String)dep.getMetadata());
+         }
+         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
+      {
+         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);
+         }
+      }
+   }
+
+   private DeploymentRegistryService getDeploymentRegistry()
+   {
+      if (registryTracker == null)
+      {
+         BundleContext context = getRegisteredBean(BundleContext.class, BEAN_SYSTEM_BUNDLE_CONTEXT);
+         registryTracker = new ServiceTracker(context, DeploymentRegistryService.class.getName(), null);
+         registryTracker.open();
+      }
+      return (DeploymentRegistryService)registryTracker.getService();
+   }
+   
+   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/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java (from rev 91048, projects/jboss-osgi/projects/integration/jbossas/trunk/src/main/java/org/jboss/osgi/integration/jbossas/MicrocontainerServiceBean.java)
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java	                        (rev 0)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/integration/MicrocontainerServiceBean.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -0,0 +1,139 @@
+/*
+ * 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.integration;
+
+//$Id$
+
+import java.util.Properties;
+
+import javax.management.MBeanServer;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.logging.Logger;
+import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
+import org.jboss.osgi.spi.service.DeployerService;
+import org.osgi.framework.BundleContext;
+
+/**
+ * An implementation of the {@link DeployerService} and {@link MicrocontainerService}
+ * which is installed as MC bean in jbossas.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class MicrocontainerServiceBean extends AbstractMicrocontainerService implements MicrocontainerServiceMBean
+{
+   private static Logger log = Logger.getLogger(MicrocontainerServiceBean.class);
+
+   private BundleContext context;
+   private MBeanServer mbeanServer;
+   private Kernel kernel;
+
+   public void setSystemContext(BundleContext context)
+   {
+      this.context = context;
+   }
+
+   public void setMbeanServer(MBeanServer mbeanServer)
+   {
+      this.mbeanServer = mbeanServer;
+   }
+
+   public void setKernel(Kernel kernel)
+   {
+      this.kernel = kernel;
+   }
+
+   public Kernel getKernel()
+   {
+      return kernel;
+   }
+
+   @Override
+   public void logDebug(String message)
+   {
+      log.debug(message);
+   }
+
+   @Override
+   public void logWarning(String message, Exception ex)
+   {
+      log.warn(message, ex);
+   }
+
+   public void start()
+   {
+      Kernel kernel = getKernel();
+      KernelController controller = kernel.getController();
+
+      // Register the MBeanServer 
+      context.registerService(MBeanServer.class.getName(), mbeanServer, null);
+      log.debug("MBeanServer registered");
+      
+      // Register the InitialContext service
+      registerInitialContext();
+      log.debug("InitialContext registered");
+      
+      // Preregister some beans
+      installBean(controller, BEAN_SYSTEM_BUNDLE_CONTEXT, context);
+      installBean(controller, BEAN_KERNEL, kernel);
+      installBean(controller, BEAN_KERNEL_CONTROLLER, controller);
+      installBean(controller, BEAN_MBEAN_SERVER, mbeanServer);
+
+      // Register the MicrocontainerService
+      log.debug("Register MicrocontainerService");
+      context.registerService(MicrocontainerService.class.getName(), this, null);
+      log.debug("MicrocontainerService registered");
+
+      // Register the DeployerService
+      Properties props = new Properties();
+      props.setProperty("provider", "microcontainer");
+      context.registerService(DeployerService.class.getName(), this, props);
+      log.debug("DeployerService registered");
+
+      // Register the MicrocontainerServiceMBean
+      registerMicrocontainerServiceMBean(mbeanServer);
+      log.debug("MicrocontainerServiceMBean registered");
+   }
+
+   void stop()
+   {
+      unregisterMicrocontainerServiceMBean(mbeanServer);
+   }
+
+   public void registerInitialContext()
+   {
+      try
+      {
+         InitialContext initialContext = new InitialContext();
+         context.registerService(InitialContext.class.getName(), initialContext, null);
+      }
+      catch (NamingException ex)
+      {
+         throw new IllegalStateException("Cannot register InitialContext", ex);
+      }
+   }
+}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java
===================================================================
--- projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java	2009-07-10 09:56:10 UTC (rev 91056)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceActivator.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -23,7 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.spi.service.MicrocontainerService;
+import org.jboss.osgi.microcontainer.MicrocontainerService;
 import org.osgi.framework.BundleActivator;
 import org.osgi.framework.BundleContext;
 

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-07-10 09:56:10 UTC (rev 91056)
+++ projects/jboss-osgi/projects/bundles/microcontainer/trunk/src/main/java/org/jboss/osgi/microcontainer/internal/MicrocontainerServiceImpl.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -35,11 +35,11 @@
 import org.jboss.kernel.Kernel;
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.osgi.common.log.LogServiceTracker;
-import org.jboss.osgi.integration.jbossas.AbstractMicrocontainerService;
 import org.jboss.osgi.jbossxb.XMLBindingService;
+import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.microcontainer.integration.AbstractMicrocontainerService;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.service.DeployerService;
-import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.jboss.virtual.VFS;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.Filter;

Deleted: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java	2009-07-10 09:56:10 UTC (rev 91056)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/service/MicrocontainerService.java	2009-07-10 10:02:21 UTC (rev 91057)
@@ -1,72 +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.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);
-
-   /*
-    * Get a registered bean from the Kernel.
-    * @return null if there is no bean registered under this name
-    */
-   <T> T getRegisteredBean(Class<T> clazz, String beanName);
-}
\ No newline at end of file




More information about the jboss-osgi-commits mailing list