[jboss-cvs] JBossAS SVN: r100121 - in projects/jboss-osgi: projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle and 8 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jan 29 09:29:44 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-01-29 09:29:43 -0500 (Fri, 29 Jan 2010)
New Revision: 100121

Added:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java
Removed:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
Modified:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
Log:
Fix initial AS integration issues

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/etc/osgitck/jboss-osgi-bootstrap.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -62,7 +62,7 @@
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">

Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java (from rev 100115, projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java	                        (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ControllerContextServiceManager.java	2010-01-29 14:29:43 UTC (rev 100121)
@@ -0,0 +1,403 @@
+/*
+ * 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.framework.bundle;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Dictionary;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.dependency.spi.Controller;
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.dependency.spi.ControllerState;
+import org.jboss.dependency.spi.tracker.ContextTracker;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.kernel.spi.qualifier.QualifierMatchers;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
+import org.jboss.metadata.spi.MutableMetaData;
+import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
+import org.jboss.metadata.spi.retrieval.MetaDataRetrievalFactory;
+import org.jboss.metadata.spi.scope.CommonLevels;
+import org.jboss.metadata.spi.scope.ScopeKey;
+import org.jboss.osgi.framework.plugins.ControllerContextPlugin;
+import org.jboss.osgi.framework.plugins.FrameworkEventsPlugin;
+import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
+import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
+import org.jboss.osgi.framework.util.KernelUtils;
+import org.jboss.osgi.framework.util.NoFilter;
+import org.osgi.framework.Filter;
+import org.osgi.framework.FrameworkUtil;
+import org.osgi.framework.InvalidSyntaxException;
+import org.osgi.framework.ServiceEvent;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * A plugin that manages OSGi services.
+ * 
+ * This implementation handles service integration with the MC.
+ * 
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 20-Jan-2010
+ */
+public class ControllerContextServiceManager extends AbstractPlugin implements ServiceManagerPlugin
+{
+   // Provide logging
+   final Logger log = Logger.getLogger(ControllerContextServiceManager.class);
+
+   /** The kernel */
+   private Kernel kernel;
+   /** The previous context tracker */
+   private ContextTracker previousTracker;
+   
+   public ControllerContextServiceManager(OSGiBundleManager bundleManager)
+   {
+      super(bundleManager);
+   }
+
+   public void start()
+   {
+      kernel = getBundleManager().getKernel();
+      applyMDRUsage(true);
+   }
+
+   public void stop()
+   {
+      applyMDRUsage(false);
+   }
+
+   public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
+   {
+      ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
+      Set<ControllerContext> contexts = plugin.getRegisteredContexts(bundleState);
+      if (contexts.isEmpty())
+         return null;
+
+      Set<ServiceReference> result = new HashSet<ServiceReference>();
+      for (ControllerContext context : contexts)
+      {
+         ServiceReference ref = getServiceReferenceForContext(context);
+         if (ref != null)
+            result.add(ref);
+      }
+      if (result.isEmpty())
+         return null;
+      
+      return result.toArray(new ServiceReference[result.size()]);
+   }
+
+   public ServiceReference[] getServicesInUse(AbstractBundleState bundleState)
+   {
+      Set<ControllerContext> contexts = bundleState.getUsedContexts(bundleState);
+      if (contexts == null || contexts.isEmpty())
+         return null;
+
+      List<ServiceReference> references = new ArrayList<ServiceReference>();
+      for (ControllerContext context : contexts)
+      {
+         ServiceReference ref = getServiceReferenceForContext(context);
+         if (ref != null)
+            references.add(ref);
+      }
+
+      if (references.isEmpty())
+         return null;
+      
+      return references.toArray(new ServiceReference[references.size()]);
+   }
+
+   public ServiceReference[] getAllServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
+   {
+      Filter filter = NoFilter.INSTANCE;
+      if (filterStr != null)
+         filter = FrameworkUtil.createFilter(filterStr);
+
+      Collection<ServiceReference> services = getServices(bundle, clazz, filter, false);
+      if (services == null || services.isEmpty())
+         return null;
+
+      return services.toArray(new ServiceReference[services.size()]);
+   }
+
+   /**
+    * Get a service
+    * 
+    * @param bundleState the bundle that requests the service
+    * @param reference the service reference
+    * @return the service
+    */
+   public Object getService(AbstractBundleState bundleState, ServiceReference reference)
+   {
+      if (reference == null)
+         throw new IllegalArgumentException("Null reference");
+      
+      ControllerContextHandle handle = (ControllerContextHandle)reference;
+      ControllerContext context = handle.getContext();
+      if (KernelUtils.isUnregistered(context)) // we're probably not installed anymore
+         return null;
+
+      return bundleState.addContextInUse(context);
+   }
+
+   public ServiceReference getServiceReference(AbstractBundleState bundle, String clazz)
+   {
+      if (clazz == null)
+         throw new IllegalArgumentException("Null clazz");
+      
+      Collection<ServiceReference> services = getServices(bundle, clazz, null, true);
+      if (services == null || services.isEmpty())
+         return null;
+
+      return services.iterator().next();
+   }
+
+   public ServiceReference[] getServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
+   {
+      Filter filter = NoFilter.INSTANCE;
+      if (filterStr != null)
+         filter = FrameworkUtil.createFilter(filterStr);
+
+      Collection<ServiceReference> services = getServices(bundle, clazz, filter, true);
+      if (services == null || services.isEmpty())
+         return null;
+
+      return services.toArray(new ServiceReference[services.size()]);
+   }
+
+   @SuppressWarnings("rawtypes")
+   public OSGiServiceState registerService(AbstractBundleState bundleState, String[] clazzes, Object service, Dictionary properties)
+   {
+      OSGiServiceState result = new OSGiServiceState(bundleState, clazzes, service, properties);
+      result.internalRegister();
+      try
+      {
+         Controller controller = kernel.getController();
+         controller.install(result);
+      }
+      catch (Throwable t)
+      {
+         getBundleManager().fireError(bundleState, "installing service to MC in", t);
+         throw new RuntimeException(t);
+      }
+
+      FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+      plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
+
+      return result;
+   }
+
+   public void unregisterService(OSGiServiceState serviceState)
+   {
+      AbstractBundleState bundleState = serviceState.getBundleState();
+      
+      Controller controller = kernel.getController();
+      controller.uninstall(serviceState.getName());
+
+      serviceState.internalUnregister();
+
+      FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+      plugin.fireServiceEvent(bundleState, ServiceEvent.UNREGISTERING, serviceState);
+   }
+
+   public boolean ungetService(AbstractBundleState bundleState, ServiceReference reference)
+   {
+      if (reference == null)
+         throw new IllegalArgumentException("Null reference");
+
+      ControllerContextHandle serviceReference = (ControllerContextHandle)reference;
+      ControllerContext context = serviceReference.getContext();
+      if (KernelUtils.isUnregistered(context))
+         return false;
+      
+      return bundleState.removeContextInUse(context);
+   }
+
+   /**
+    * Apply OSGi's MDR usage:
+    * - add/remove system bundle as default context tracker
+    * - add/remove instance metadata retrieval factory 
+    *
+    * @param register do we register or unregister
+    */
+   private void applyMDRUsage(boolean register)
+   {
+      MutableMetaDataRepository repository = kernel.getMetaDataRepository().getMetaDataRepository();
+      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
+      if (register && retrieval == null)
+      {
+         retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
+         repository.addMetaDataRetrieval(retrieval);
+      }
+      if (retrieval != null && retrieval instanceof MutableMetaData)
+      {
+         MutableMetaData mmd = (MutableMetaData)retrieval;
+         if (register)
+         {
+            OSGiSystemState systemBundle = getBundleManager().getSystemBundle();
+            previousTracker = mmd.addMetaData(systemBundle, ContextTracker.class);
+         }
+         else
+         {
+            if (previousTracker == null)
+            {
+               mmd.removeMetaData(ContextTracker.class);
+               if (retrieval.isEmpty())
+                  repository.removeMetaDataRetrieval(retrieval.getScope());
+            }
+            else
+            {
+               mmd.addMetaData(previousTracker, ContextTracker.class);
+            }
+         }
+      }
+
+      // osgi ldap filter parsing and matching
+      FilterParserAndMatcher fpm = FilterParserAndMatcher.INSTANCE;
+      QualifierMatchers matchers = QualifierMatchers.getInstance();
+
+      if (register)
+      {
+         matchers.addParser(fpm);
+         matchers.addMatcher(fpm);
+
+         MetaDataRetrievalFactory mdrFactory = getMetaDataRetrievalFactory();
+         repository.addMetaDataRetrievalFactory(CommonLevels.INSTANCE, mdrFactory);
+      }
+      else
+      {
+         repository.removeMetaDataRetrievalFactory(CommonLevels.INSTANCE);
+
+         matchers.removeParser(fpm.getHandledContent());
+         matchers.removeMatcher(fpm.getHandledType());
+      }
+   }
+
+   private MetaDataRetrievalFactory getMetaDataRetrievalFactory()
+   {
+      MetaDataRetrievalFactory mdrFactory;
+      Controller controller = kernel.getController();
+      InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(controller);
+      imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
+      imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
+      // TODO - JMX?
+      mdrFactory = imdrf;
+      return mdrFactory;
+   }
+
+   private Collection<ServiceReference> getServices(AbstractBundleState bundle, String clazz, Filter filter, boolean checkAssignable)
+   {
+      Set<ControllerContext> contexts;
+      KernelController controller = kernel.getController();
+
+      // Don't check assignabilty for the system bundle
+      boolean isSystemBundle = (bundle.getBundleId() == 0);
+      if (isSystemBundle)
+         checkAssignable = false;
+
+      // TODO - a bit slow for system bundle
+      if (clazz != null && isSystemBundle == false)
+      {
+         Class<?> type = getBundleManager().loadClassFailsafe(bundle, clazz);
+         if (type == null)
+            return null; // or check all?
+
+         contexts = controller.getContexts(type, ControllerState.INSTALLED);
+      }
+      else
+      {
+         contexts = controller.getContextsByState(ControllerState.INSTALLED);
+      }
+
+      if (contexts == null || contexts.isEmpty())
+         return null;
+
+      if (filter == null)
+         filter = NoFilter.INSTANCE;
+
+      List<ControllerContext> sorted = new ArrayList<ControllerContext>(contexts);
+      Collections.sort(sorted, ContextComparator.INSTANCE); // Sort by the spec, should bubble up
+      Collection<ServiceReference> result = new ArrayList<ServiceReference>();
+      for (ControllerContext context : sorted)
+      {
+         // re-check?? -- we already only get INSTALLED 
+         if (KernelUtils.isUnregistered(context) == false)
+         {
+            ServiceReference ref = getServiceReferenceForContext(context);
+            if (filter.match(ref) && hasPermission(context))
+            {
+               if (clazz == null || isSystemBundle == false || MDRUtils.matchClass(context, clazz))
+               {
+                  // Check the assignability
+                  if (checkAssignable == false || MDRUtils.isAssignableTo(context, bundle))
+                     result.add(ref);
+               }
+            }
+         }
+      }
+      return result;
+   }
+
+   /**
+    * Get service reference for context.
+    *
+    * @param context the context
+    * @return service reference
+    */
+   private ServiceReference getServiceReferenceForContext(ControllerContext context)
+   {
+      if (context instanceof OSGiServiceState)
+      {
+         OSGiServiceState service = (OSGiServiceState)context;
+         return service.hasPermission() ? service.getReferenceInternal() : null;
+      }
+
+      OSGiBundleManager manager = getBundleManager();
+      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+      AbstractBundleState bundleState = plugin.getBundleForContext(context);
+      return new GenericServiceReferenceWrapper(context, bundleState);
+   }
+
+   /**
+    * Do we have a permission to use context.
+    *
+    * @param context the context
+    * @return true if allowed to use context, false otherwise
+    */
+   private boolean hasPermission(ControllerContext context)
+   {
+      // TODO - make thisa generic, w/o casting
+      if (context instanceof OSGiServiceState)
+      {
+         OSGiServiceState serviceState = (OSGiServiceState)context;
+         return serviceState.hasPermission();
+      }
+      return true;
+   }
+}
\ No newline at end of file

Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java	2010-01-29 14:29:43 UTC (rev 100121)
@@ -1,400 +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.framework.bundle;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Dictionary;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.jboss.dependency.spi.Controller;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.dependency.spi.tracker.ContextTracker;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.spi.dependency.KernelController;
-import org.jboss.kernel.spi.qualifier.QualifierMatchers;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.plugins.loader.memory.MemoryMetaDataLoader;
-import org.jboss.metadata.spi.MutableMetaData;
-import org.jboss.metadata.spi.repository.MutableMetaDataRepository;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrieval;
-import org.jboss.metadata.spi.retrieval.MetaDataRetrievalFactory;
-import org.jboss.metadata.spi.scope.CommonLevels;
-import org.jboss.metadata.spi.scope.ScopeKey;
-import org.jboss.osgi.framework.plugins.ControllerContextPlugin;
-import org.jboss.osgi.framework.plugins.FrameworkEventsPlugin;
-import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
-import org.jboss.osgi.framework.plugins.internal.AbstractPlugin;
-import org.jboss.osgi.framework.util.KernelUtils;
-import org.jboss.osgi.framework.util.NoFilter;
-import org.osgi.framework.Filter;
-import org.osgi.framework.FrameworkUtil;
-import org.osgi.framework.InvalidSyntaxException;
-import org.osgi.framework.ServiceEvent;
-import org.osgi.framework.ServiceReference;
-
-/**
- * A plugin that manages OSGi services
- * 
- * @author thomas.diesler at jboss.com
- * @since 20-Jan-2010
- */
-public class ServiceManagerPluginImpl extends AbstractPlugin implements ServiceManagerPlugin
-{
-   // Provide logging
-   final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
-
-   /** The kernel */
-   private Kernel kernel;
-   /** The previous context tracker */
-   private ContextTracker previousTracker;
-   
-   public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
-   {
-      super(bundleManager);
-   }
-
-   public void start()
-   {
-      kernel = getBundleManager().getKernel();
-      applyMDRUsage(true);
-   }
-
-   public void stop()
-   {
-      applyMDRUsage(false);
-   }
-
-   public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
-   {
-      ControllerContextPlugin plugin = getBundleManager().getPlugin(ControllerContextPlugin.class);
-      Set<ControllerContext> contexts = plugin.getRegisteredContexts(bundleState);
-      if (contexts.isEmpty())
-         return null;
-
-      Set<ServiceReference> result = new HashSet<ServiceReference>();
-      for (ControllerContext context : contexts)
-      {
-         ServiceReference ref = getServiceReferenceForContext(context);
-         if (ref != null)
-            result.add(ref);
-      }
-      if (result.isEmpty())
-         return null;
-      
-      return result.toArray(new ServiceReference[result.size()]);
-   }
-
-   public ServiceReference[] getServicesInUse(AbstractBundleState bundleState)
-   {
-      Set<ControllerContext> contexts = bundleState.getUsedContexts(bundleState);
-      if (contexts == null || contexts.isEmpty())
-         return null;
-
-      List<ServiceReference> references = new ArrayList<ServiceReference>();
-      for (ControllerContext context : contexts)
-      {
-         ServiceReference ref = getServiceReferenceForContext(context);
-         if (ref != null)
-            references.add(ref);
-      }
-
-      if (references.isEmpty())
-         return null;
-      
-      return references.toArray(new ServiceReference[references.size()]);
-   }
-
-   public ServiceReference[] getAllServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
-   {
-      Filter filter = NoFilter.INSTANCE;
-      if (filterStr != null)
-         filter = FrameworkUtil.createFilter(filterStr);
-
-      Collection<ServiceReference> services = getServices(bundle, clazz, filter, false);
-      if (services == null || services.isEmpty())
-         return null;
-
-      return services.toArray(new ServiceReference[services.size()]);
-   }
-
-   /**
-    * Get a service
-    * 
-    * @param bundleState the bundle that requests the service
-    * @param reference the service reference
-    * @return the service
-    */
-   public Object getService(AbstractBundleState bundleState, ServiceReference reference)
-   {
-      if (reference == null)
-         throw new IllegalArgumentException("Null reference");
-      
-      ControllerContextHandle handle = (ControllerContextHandle)reference;
-      ControllerContext context = handle.getContext();
-      if (KernelUtils.isUnregistered(context)) // we're probably not installed anymore
-         return null;
-
-      return bundleState.addContextInUse(context);
-   }
-
-   public ServiceReference getServiceReference(AbstractBundleState bundle, String clazz)
-   {
-      if (clazz == null)
-         throw new IllegalArgumentException("Null clazz");
-      
-      Collection<ServiceReference> services = getServices(bundle, clazz, null, true);
-      if (services == null || services.isEmpty())
-         return null;
-
-      return services.iterator().next();
-   }
-
-   public ServiceReference[] getServiceReferences(AbstractBundleState bundle, String clazz, String filterStr) throws InvalidSyntaxException
-   {
-      Filter filter = NoFilter.INSTANCE;
-      if (filterStr != null)
-         filter = FrameworkUtil.createFilter(filterStr);
-
-      Collection<ServiceReference> services = getServices(bundle, clazz, filter, true);
-      if (services == null || services.isEmpty())
-         return null;
-
-      return services.toArray(new ServiceReference[services.size()]);
-   }
-
-   @SuppressWarnings("rawtypes")
-   public OSGiServiceState registerService(AbstractBundleState bundleState, String[] clazzes, Object service, Dictionary properties)
-   {
-      OSGiServiceState result = new OSGiServiceState(bundleState, clazzes, service, properties);
-      result.internalRegister();
-      try
-      {
-         Controller controller = kernel.getController();
-         controller.install(result);
-      }
-      catch (Throwable t)
-      {
-         getBundleManager().fireError(bundleState, "installing service to MC in", t);
-         throw new RuntimeException(t);
-      }
-
-      FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
-      plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
-
-      return result;
-   }
-
-   public void unregisterService(OSGiServiceState serviceState)
-   {
-      AbstractBundleState bundleState = serviceState.getBundleState();
-      
-      Controller controller = kernel.getController();
-      controller.uninstall(serviceState.getName());
-
-      serviceState.internalUnregister();
-
-      FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
-      plugin.fireServiceEvent(bundleState, ServiceEvent.UNREGISTERING, serviceState);
-   }
-
-   public boolean ungetService(AbstractBundleState bundleState, ServiceReference reference)
-   {
-      if (reference == null)
-         throw new IllegalArgumentException("Null reference");
-
-      ControllerContextHandle serviceReference = (ControllerContextHandle)reference;
-      ControllerContext context = serviceReference.getContext();
-      if (KernelUtils.isUnregistered(context))
-         return false;
-      
-      return bundleState.removeContextInUse(context);
-   }
-
-   /**
-    * Apply OSGi's MDR usage:
-    * - add/remove system bundle as default context tracker
-    * - add/remove instance metadata retrieval factory 
-    *
-    * @param register do we register or unregister
-    */
-   private void applyMDRUsage(boolean register)
-   {
-      MutableMetaDataRepository repository = kernel.getMetaDataRepository().getMetaDataRepository();
-      MetaDataRetrieval retrieval = repository.getMetaDataRetrieval(ScopeKey.DEFAULT_SCOPE);
-      if (register && retrieval == null)
-      {
-         retrieval = new MemoryMetaDataLoader(ScopeKey.DEFAULT_SCOPE);
-         repository.addMetaDataRetrieval(retrieval);
-      }
-      if (retrieval != null && retrieval instanceof MutableMetaData)
-      {
-         MutableMetaData mmd = (MutableMetaData)retrieval;
-         if (register)
-         {
-            OSGiSystemState systemBundle = getBundleManager().getSystemBundle();
-            previousTracker = mmd.addMetaData(systemBundle, ContextTracker.class);
-         }
-         else
-         {
-            if (previousTracker == null)
-            {
-               mmd.removeMetaData(ContextTracker.class);
-               if (retrieval.isEmpty())
-                  repository.removeMetaDataRetrieval(retrieval.getScope());
-            }
-            else
-            {
-               mmd.addMetaData(previousTracker, ContextTracker.class);
-            }
-         }
-      }
-
-      // osgi ldap filter parsing and matching
-      FilterParserAndMatcher fpm = FilterParserAndMatcher.INSTANCE;
-      QualifierMatchers matchers = QualifierMatchers.getInstance();
-
-      if (register)
-      {
-         matchers.addParser(fpm);
-         matchers.addMatcher(fpm);
-
-         MetaDataRetrievalFactory mdrFactory = getMetaDataRetrievalFactory();
-         repository.addMetaDataRetrievalFactory(CommonLevels.INSTANCE, mdrFactory);
-      }
-      else
-      {
-         repository.removeMetaDataRetrievalFactory(CommonLevels.INSTANCE);
-
-         matchers.removeParser(fpm.getHandledContent());
-         matchers.removeMatcher(fpm.getHandledType());
-      }
-   }
-
-   private MetaDataRetrievalFactory getMetaDataRetrievalFactory()
-   {
-      MetaDataRetrievalFactory mdrFactory;
-      Controller controller = kernel.getController();
-      InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(controller);
-      imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
-      imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
-      // TODO - JMX?
-      mdrFactory = imdrf;
-      return mdrFactory;
-   }
-
-   private Collection<ServiceReference> getServices(AbstractBundleState bundle, String clazz, Filter filter, boolean checkAssignable)
-   {
-      Set<ControllerContext> contexts;
-      KernelController controller = kernel.getController();
-
-      // Don't check assignabilty for the system bundle
-      boolean isSystemBundle = (bundle.getBundleId() == 0);
-      if (isSystemBundle)
-         checkAssignable = false;
-
-      // TODO - a bit slow for system bundle
-      if (clazz != null && isSystemBundle == false)
-      {
-         Class<?> type = getBundleManager().loadClassFailsafe(bundle, clazz);
-         if (type == null)
-            return null; // or check all?
-
-         contexts = controller.getContexts(type, ControllerState.INSTALLED);
-      }
-      else
-      {
-         contexts = controller.getContextsByState(ControllerState.INSTALLED);
-      }
-
-      if (contexts == null || contexts.isEmpty())
-         return null;
-
-      if (filter == null)
-         filter = NoFilter.INSTANCE;
-
-      List<ControllerContext> sorted = new ArrayList<ControllerContext>(contexts);
-      Collections.sort(sorted, ContextComparator.INSTANCE); // Sort by the spec, should bubble up
-      Collection<ServiceReference> result = new ArrayList<ServiceReference>();
-      for (ControllerContext context : sorted)
-      {
-         // re-check?? -- we already only get INSTALLED 
-         if (KernelUtils.isUnregistered(context) == false)
-         {
-            ServiceReference ref = getServiceReferenceForContext(context);
-            if (filter.match(ref) && hasPermission(context))
-            {
-               if (clazz == null || isSystemBundle == false || MDRUtils.matchClass(context, clazz))
-               {
-                  // Check the assignability
-                  if (checkAssignable == false || MDRUtils.isAssignableTo(context, bundle))
-                     result.add(ref);
-               }
-            }
-         }
-      }
-      return result;
-   }
-
-   /**
-    * Get service reference for context.
-    *
-    * @param context the context
-    * @return service reference
-    */
-   private ServiceReference getServiceReferenceForContext(ControllerContext context)
-   {
-      if (context instanceof OSGiServiceState)
-      {
-         OSGiServiceState service = (OSGiServiceState)context;
-         return service.hasPermission() ? service.getReferenceInternal() : null;
-      }
-
-      OSGiBundleManager manager = getBundleManager();
-      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
-      AbstractBundleState bundleState = plugin.getBundleForContext(context);
-      return new GenericServiceReferenceWrapper(context, bundleState);
-   }
-
-   /**
-    * Do we have a permission to use context.
-    *
-    * @param context the context
-    * @return true if allowed to use context, false otherwise
-    */
-   private boolean hasPermission(ControllerContext context)
-   {
-      // TODO - make thisa generic, w/o casting
-      if (context instanceof OSGiServiceState)
-      {
-         OSGiServiceState serviceState = (OSGiServiceState)context;
-         return serviceState.hasPermission();
-      }
-      return true;
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiManifestParsingDeployer.java	2010-01-29 14:29:43 UTC (rev 100121)
@@ -29,6 +29,7 @@
 import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
 import org.jboss.osgi.spi.OSGiConstants;
 import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Version;
 
 /**
  * OSGiManifestParsingDeployer.<p>
@@ -55,11 +56,13 @@
       // At least one of these manifest headers must be there
       // Note, in R3 and R4 there is no common mandatory header
       String bundleName = osgiMetaData.getBundleName();
-      String bundleVersion = osgiMetaData.getBundleVersion();
       String bundleSymbolicName = osgiMetaData.getBundleSymbolicName();
-      if (bundleName == null && bundleVersion == null && bundleSymbolicName == null)
-         osgiMetaData = null;
+      Version bundleVersion = Version.parseVersion(osgiMetaData.getBundleVersion());
       
+      boolean isEmptyVersion = Version.emptyVersion.equals(bundleVersion);
+      if (bundleName == null && bundleSymbolicName == null && isEmptyVersion == true)
+         return null;
+      
       return osgiMetaData;
    }
 

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiNativeCodeMetaDataDeployer.java	2010-01-29 14:29:43 UTC (rev 100121)
@@ -114,17 +114,14 @@
    @Override
    protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
    {
-      OSGiClassLoadingMetaData classLoadingMetaData = (OSGiClassLoadingMetaData)unit.getAttachment(ClassLoadingMetaData.class);
-      if (classLoadingMetaData == null)
-         throw new IllegalStateException("No ClassLoadingMetaData");
-
       AbstractBundleState absBundleState = unit.getAttachment(AbstractBundleState.class);
-      if (absBundleState == null)
-         throw new IllegalStateException("No AbstractBundleState");
-
       if ((absBundleState instanceof OSGiBundleState) == false)
          return;
 
+      OSGiClassLoadingMetaData classLoadingMetaData = (OSGiClassLoadingMetaData)unit.getAttachment(ClassLoadingMetaData.class);
+      if (classLoadingMetaData == null)
+         throw new IllegalStateException("No ClassLoadingMetaData");
+
       OSGiBundleState bundleState = (OSGiBundleState)absBundleState;
       OSGiBundleManager bundleManager = bundleState.getBundleManager();
       OSGiMetaData osgiMetaData = bundleState.getOSGiMetaData();

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/WebXMLVerifierInterceptor.java	2010-01-29 14:29:43 UTC (rev 100121)
@@ -48,10 +48,7 @@
    public WebXMLVerifierInterceptor(OSGiBundleManager bundleManager)
    {
       super(bundleManager);
-   }
-
-   public void startService()
-   {
+      
       delegate = new AbstractLifecycleInterceptor()
       {
          public void invoke(int state, InvocationContext context) throws LifecycleInterceptorException
@@ -78,7 +75,10 @@
             }
          }
       };
+   }
 
+   public void startService()
+   {
       getSystemContext().registerService(LifecycleInterceptor.class.getName(), delegate, null);
    }
 

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -49,13 +49,13 @@
   <bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
     <constructor>
       <parameter><inject bean="OSGiBundleManager" /></parameter>
-      <parameter><inject bean="DeploymentRegistry" /></parameter>
+      <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
     </constructor>
   </bean>
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
@@ -103,9 +103,6 @@
     <property name="deployers"><inject bean="Deployers" /></property>
   </bean>
 
-  <!-- The deployment registry -->
-  <bean name="DeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
-
   <!-- The holder for deployers that determine structure -->
   <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
     <property name="structureBuilder">
@@ -139,9 +136,12 @@
     <constructor>
       <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
     </constructor>
-    <property name="deploymentRegistry"><inject bean="DeploymentRegistry"/></property>
+    <property name="deploymentRegistry"><inject bean="OSGiDeploymentRegistry"/></property>
   </bean>
 
+  <!-- The deployment registry -->
+  <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
   <!-- OSGI Deployment -->
   <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
   <bean name="OSGiBundleStateAddDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateAddDeployer">

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/user-input-spec.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -29,8 +29,8 @@
     <field type="radio" variable="jbossSelection">
       <description align="left" txt="Please choose your target container" />
       <spec>
-        <choice txt="JBoss-6.0.0.M1" value="jboss600" set="true"/>
-        <choice txt="JBoss-6.0.0-SNAPSHOT" value="jboss601"/>
+        <!-- choice txt="JBoss-6.0.0.M2" value="jboss600" set="true"/ -->
+        <choice txt="JBoss-6.0.0-SNAPSHOT" value="jboss601" set="true"/>
       </spec>
     </field>
     <field type="text" variable="jbossTargetServer">

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -99,13 +99,13 @@
   <bean name="OSGiControllerContextPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextPluginImpl">
     <constructor>
       <parameter><inject bean="OSGiBundleManager" /></parameter>
-      <parameter><inject bean="DeploymentRegistry" /></parameter>
+      <parameter><inject bean="OSGiDeploymentRegistry" /></parameter>
     </constructor>
   </bean>
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
@@ -139,18 +139,6 @@
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   
-  <!-- 
-  ********************************
-  *                              *  
-  *  Framework                   *
-  *                              *
-  ********************************
-  -->
-
-  <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
-    <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
-  </bean>
-  
   <!--
   ********************************
   *                              *  
@@ -171,6 +159,9 @@
   ********************************
   -->
   
+  <!-- The deployment registry -->
+  <bean name="OSGiDeploymentRegistry" class="org.jboss.deployers.structure.spi.helpers.AbstractDeploymentRegistry"/>
+
   <bean name="OSGiDeployersWrapper" class="org.jboss.osgi.framework.deployers.OSGiDeployersWrapper" >
     <constructor>
       <parameter><inject bean="MainDeployer"/></parameter>
@@ -215,24 +206,18 @@
     <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
     <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
   </bean>
-  <bean name="OSGiModuleDeployer" class="org.jboss.osgi.framework.deployers.OSGiModuleDeployer">
-    <property name="classLoading"><inject bean="ClassLoading" /></property>
-  </bean>
   <bean name="OSGiFragmentAttachmentDeployer" class="org.jboss.osgi.framework.deployers.OSGiFragmentAttachmentDeployer"/>
    
-  <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
-    <incallback method="addModule" state="Configured" />
-    <uncallback method="removeModule" state="Configured" />
-  </bean>
-  <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
-    <property name="defaultMetaData">
-      <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
-    </property>
-  </bean>
-  <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
-  <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
-    <property name="classLoading"><inject bean="ClassLoading" /></property>
-    <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
-  </bean>
+  <!-- 
+  ********************************
+  *                              *  
+  *  Framework                   *
+  *                              *
+  ********************************
+  -->
 
+  <bean name="jboss.osgi:service=Framework" class="org.jboss.osgi.framework.launch.OSGiFramework">
+    <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+  </bean>
+  
 </deployment>
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -99,7 +99,7 @@
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -82,7 +82,7 @@
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManager" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-29 13:44:57 UTC (rev 100120)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2010-01-29 14:29:43 UTC (rev 100121)
@@ -81,7 +81,7 @@
   <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
+  <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ControllerContextServiceManager">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">




More information about the jboss-cvs-commits mailing list