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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Feb 10 05:39:46 EST 2010


Author: thomas.diesler at jboss.com
Date: 2010-02-10 05:39:45 -0500 (Wed, 10 Feb 2010)
New Revision: 100793

Removed:
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/
Modified:
   projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java
   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/plugins/ServiceManagerPlugin.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java
   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/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml
   projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
Log:
[JBOSGI-141] Restore AS integration to a working state

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml	2010-02-10 10:39:45 UTC (rev 100793)
@@ -48,7 +48,7 @@
     <version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
     <version.jboss.classloading>2.2.0.Alpha1</version.jboss.classloading>
     <version.jboss.deployers>2.2.0.Alpha1</version.jboss.deployers>
-    <version.jboss.kernel>2.2.0-SNAPSHOT</version.jboss.kernel>
+    <version.jboss.kernel>2.2.0.Alpha5</version.jboss.kernel>
     <version.jboss.logging>2.1.0.GA</version.jboss.logging>
     <version.jboss.mdr>2.2.0.Alpha1</version.jboss.mdr>
     <version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
@@ -131,26 +131,24 @@
       <groupId>org.jboss.deployers</groupId>
       <artifactId>jboss-deployers-jmx</artifactId>
       <version>${version.jboss.deployers}</version>
-      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.jboss.kernel</groupId>
       <artifactId>jboss-kernel</artifactId>
       <version>${version.jboss.kernel}</version>
     </dependency>
-      <dependency>
-        <groupId>org.jboss.kernel</groupId>
-        <artifactId>jboss-jmx-mc-int</artifactId>
-        <version>${version.jboss.kernel}</version>
-      </dependency>
     <dependency>
       <groupId>org.jboss.kernel</groupId>
       <artifactId>jboss-jmx-aop-mc-int</artifactId>
       <version>${version.jboss.kernel}</version>
-      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.jboss.kernel</groupId>
+      <artifactId>jboss-jmx-mc-int</artifactId>
+      <version>${version.jboss.kernel}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.kernel</groupId>
       <artifactId>jboss-dependency</artifactId>
       <version>${version.jboss.kernel}</version>
     </dependency>

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -525,11 +525,13 @@
       checkValidBundleContext();
       ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
       OSGiServiceState serviceState = (OSGiServiceState)plugin.registerService(this, clazzes, service, properties);
+      afterServiceRegistration(serviceState);
       return serviceState.getRegistration();
    }
 
    void unregisterService(OSGiServiceState serviceState)
    {
+      beforeServiceUnregistration(serviceState);
       ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
       plugin.unregisterService(serviceState);
    }
@@ -541,6 +543,20 @@
       return plugin.ungetService(this, reference);
    }
 
+   /**
+    * After service registration callback.
+    */
+   protected void afterServiceRegistration(OSGiServiceState service)
+   {
+   }
+
+   /**
+    * Before service unregistration callback.
+    */
+   protected void beforeServiceUnregistration(OSGiServiceState service)
+   {
+   }
+
    boolean ungetContext(ControllerContext context)
    {
       return removeContextInUse(context);

Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractDictionaryFactory.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,170 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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;
-
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.spi.config.KernelConfigurator;
-import org.jboss.reflect.spi.ClassInfo;
-import org.jboss.system.microcontainer.ServiceControllerContext;
-import org.jboss.util.collection.Iterators;
-import org.osgi.framework.Constants;
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-/**
- * Abstract dictionary factory.
- *
- * @author <a href="ales.justin at jboss.org">Ales Justin</a>
- */
-public abstract class AbstractDictionaryFactory<T extends ControllerContext> implements DictionaryFactory<T>
-{
-   protected static final String NAME = "bean.name";
-   protected static final String[] EMPTY = new String[0];
-   private KernelConfigurator configurator;
-   private final ClassInfo OBJECT;
-
-   public AbstractDictionaryFactory(KernelConfigurator configurator)
-   {
-      if (configurator == null)
-         throw new IllegalArgumentException("Null configurator");
-
-      this.configurator = configurator;
-      OBJECT = getClassInfo(Object.class);
-   }
-
-   protected ClassInfo getClassInfo(Class<?> clazz)
-   {
-      try
-      {
-         return configurator.getClassInfo(clazz);
-      }
-      catch (Throwable t)
-      {
-         throw new RuntimeException(t);
-      }
-   }
-
-   protected class ControllerContextDictionary extends Dictionary<String, Object>
-   {
-      private Map<Object, Object> map;
-      private ControllerContext context;
-
-      protected ControllerContextDictionary(ControllerContext context)
-      {
-         this.context = context;
-         this.map = new ConcurrentHashMap<Object, Object>(2);
-         map.put(NAME, getName(context));
-         map.put(Constants.OBJECTCLASS, EMPTY);
-      }
-
-      protected Object getName(ControllerContext context)
-      {
-         return context.getName();
-      }
-
-      public int size()
-      {
-         return map.size();
-      }
-
-      public boolean isEmpty()
-      {
-         return size() == 0;
-      }
-
-      @SuppressWarnings({"unchecked"})
-      public Enumeration<String> keys()
-      {
-         return Iterators.toEnumeration(map.keySet().iterator());
-      }
-
-      @SuppressWarnings({"unchecked"})
-      public Enumeration<Object> elements()
-      {
-         return Iterators.toEnumeration(map.values().iterator());
-      }
-
-      public Object get(Object key)
-      {
-         Object value = map.get(key);
-         if (value != EMPTY)
-            return value;
-
-         ClassInfo clazz;
-         Object target = context.getTarget();
-         if (target != null)
-         {
-            clazz = getClassInfo(target.getClass());
-         }
-         else
-            clazz = getFromNullTarget(context);
-
-         String[] classes = EMPTY;
-         if (clazz != null)
-         {
-            Set<String> clazzes = new HashSet<String>();
-            traverseClass(clazz, clazzes);
-            classes = clazzes.toArray(new String[clazzes.size()]);
-            map.put(Constants.OBJECTCLASS, classes);
-         }
-         return classes;
-      }
-           
-      protected ClassInfo getFromNullTarget(ControllerContext context)
-      {
-         return null;
-      }
-
-      public Object put(String key, Object value)
-      {
-         return map.put(key, value);
-      }
-
-      public Object remove(Object key)
-      {
-         return map.remove(key);
-      }
-
-      protected void traverseClass(ClassInfo clazz, Set<String> classes)
-      {
-         if (clazz == null || clazz == OBJECT)
-         {
-            return;
-         }
-
-         classes.add(clazz.getName());
-
-         // traverse superclass
-         traverseClass(clazz.getSuperclass(), classes);
-         ClassInfo[] interfaces = clazz.getInterfaces();
-         if (interfaces != null)
-         {
-            // traverse interfaces
-            for(ClassInfo intface : interfaces)
-            {
-               traverseClass(intface, classes);
-            }
-         }
-      }
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/DescribeAction.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -45,7 +45,7 @@
       KernelMetaDataRepository repository = getRepository(context);
       ScopeKey contextScopeKey = context.getScopeInfo().getMutableScope();
       Scope scope = contextScopeKey.getScope(CommonLevels.INSTANCE);
-      ScopeKey key = new ScopeKey(scope).getOptimizedKey();
+      ScopeKey key = new ScopeKey(scope);
       MutableMetaDataRepository mutable = repository.getMetaDataRepository();
       MetaDataRetrieval retrieval = mutable.getMetaDataRetrieval(key);
       if (retrieval == null)

Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/JMXDictionaryFactory.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,52 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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;
-
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.spi.config.KernelConfigurator;
-import org.jboss.system.microcontainer.ServiceControllerContext;
-
-import java.util.Dictionary;
-
-/**
- * JMX dictionary factory.
- * TODO - expose all classes, or just explicit target class and its mbean interface?
- *
- * @author <a href="ales.justin at jboss.org">Ales Justin</a>
- */
-public class JMXDictionaryFactory extends AbstractDictionaryFactory<ServiceControllerContext>
-{
-   public JMXDictionaryFactory(KernelConfigurator configurator)
-   {
-      super(configurator);
-   }
-
-   public Class<ServiceControllerContext> getContextType()
-   {
-      return ServiceControllerContext.class;
-   }
-
-   public Dictionary<String, Object> getDictionary(ServiceControllerContext context)
-   {
-      return new ControllerContextDictionary(context);
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/KernelDictionaryFactory.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -22,25 +22,52 @@
 package org.jboss.osgi.framework.bundle;
 
 import java.util.Dictionary;
+import java.util.Enumeration;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
 
 import org.jboss.beans.info.spi.BeanInfo;
-import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.kernel.spi.config.KernelConfigurator;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
 import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.util.collection.Iterators;
+import org.osgi.framework.Constants;
 
 /**
  * Kernel dictionary factory.
  *
  * @author <a href="ales.justin at jboss.org">Ales Justin</a>
  */
-public class KernelDictionaryFactory extends AbstractDictionaryFactory<KernelControllerContext>
+public class KernelDictionaryFactory implements DictionaryFactory<KernelControllerContext>
 {
+   private static final String NAME = "bean.name";
+   private static final String[] EMPTY = new String[0];
+   private KernelConfigurator configurator;
+   private final ClassInfo OBJECT;
+
    public KernelDictionaryFactory(KernelConfigurator configurator)
    {
-      super(configurator);
+      if (configurator == null)
+         throw new IllegalArgumentException("Null configurator");
+
+      this.configurator = configurator;
+      OBJECT = getClassInfo(Object.class);
    }
 
+   private ClassInfo getClassInfo(Class<?> clazz)
+   {
+      try
+      {
+         return configurator.getClassInfo(clazz);
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException(t);
+      }
+   }
+
    public Class<KernelControllerContext> getContextType()
    {
       return KernelControllerContext.class;
@@ -51,19 +78,100 @@
       return new KernelDictionary(context);
    }
 
-   private class KernelDictionary extends ControllerContextDictionary
+   private class KernelDictionary extends Dictionary<String, Object>
    {
+      private Map<Object, Object> map;
+      private KernelControllerContext context;
+
       private KernelDictionary(KernelControllerContext context)
       {
-         super(context);
+         this.context = context;
+         this.map = new ConcurrentHashMap<Object, Object>(2);
+         map.put(NAME, context.getName());
+         map.put(Constants.OBJECTCLASS, EMPTY);
       }
 
-      @Override
-      protected ClassInfo getFromNullTarget(ControllerContext context)
+      public int size()
       {
-         KernelControllerContext kcc = KernelControllerContext.class.cast(context);
-         BeanInfo beanInfo = kcc.getBeanInfo();
-         return beanInfo != null ? beanInfo.getClassInfo() : null;
+         return map.size();
       }
+
+      public boolean isEmpty()
+      {
+         return size() == 0;
+      }
+
+      @SuppressWarnings({"unchecked"})
+      public Enumeration<String> keys()
+      {
+         return Iterators.toEnumeration(map.keySet().iterator());
+      }
+
+      @SuppressWarnings({"unchecked"})
+      public Enumeration<Object> elements()
+      {
+         return Iterators.toEnumeration(map.values().iterator());
+      }
+
+      public Object get(Object key)
+      {
+         Object value = map.get(key);
+         if (value != EMPTY)
+            return value;
+
+         ClassInfo clazz = null;
+         Object target = context.getTarget();
+         BeanInfo info = context.getBeanInfo();
+         if (target != null)
+         {
+            clazz = getClassInfo(target.getClass());
+         }
+         else if (info != null)
+         {
+            clazz = info.getClassInfo();
+         }
+
+         String[] classes = EMPTY;
+         if (clazz != null)
+         {
+            Set<String> clazzes = new HashSet<String>();
+            traverseClass(clazz, clazzes);
+            classes = clazzes.toArray(new String[clazzes.size()]);
+            map.put(Constants.OBJECTCLASS, classes);
+         }
+         return classes;
+      }
+
+      public Object put(String key, Object value)
+      {
+         return map.put(key, value);
+      }
+
+      public Object remove(Object key)
+      {
+         return map.remove(key);
+      }
+
+      protected void traverseClass(ClassInfo clazz, Set<String> classes)
+      {
+         if (clazz == null || clazz == OBJECT)
+         {
+            return;
+         }
+
+         classes.add(clazz.getName());
+
+         // traverse superclass
+         traverseClass(clazz.getSuperclass(), classes);
+         ClassInfo[] interfaces = clazz.getInterfaces();
+         if (interfaces != null)
+         {
+            // traverse interfaces
+            for(ClassInfo intface : interfaces)
+            {
+               traverseClass(intface, classes);
+            }
+         }
+      }
    }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleState.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -30,6 +30,7 @@
 import java.util.Dictionary;
 import java.util.Enumeration;
 import java.util.List;
+import java.util.Set;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
@@ -38,7 +39,7 @@
 import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData;
 import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData.FragmentHostMetaData;
 import org.jboss.osgi.framework.metadata.OSGiMetaData;
-import org.jboss.osgi.framework.plugins.ServiceManagerPlugin;
+import org.jboss.osgi.framework.plugins.ControllerContextPlugin;
 import org.osgi.framework.AdminPermission;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleActivator;
@@ -131,6 +132,13 @@
       return false;
    }
 
+   protected Set<ControllerContext> getRegisteredContexts()
+   {
+      OSGiBundleManager manager = getBundleManager();
+      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+      return plugin.getRegisteredContexts(this);
+   }
+
    public Class<?> loadClass(String name) throws ClassNotFoundException
    {
       checkInstalled();
@@ -306,8 +314,8 @@
       Throwable rethrow = null;
       if (priorState == Bundle.ACTIVE)
       {
+         BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
          BundleContext bundleContext = getBundleContext();
-         BundleActivator bundleActivator = getDeploymentUnit().getAttachment(BundleActivator.class);
          if (bundleActivator != null && bundleContext != null)
          {
             try
@@ -322,8 +330,9 @@
       }
 
       // Any services registered by this bundle must be unregistered
-      ServiceManagerPlugin plugin = getBundleManager().getPlugin(ServiceManagerPlugin.class);
-      plugin.unregisterServices(this);
+      OSGiBundleManager manager = getBundleManager();
+      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+      plugin.unregisterContexts(this);
 
       // Any services used by this bundle must be released
       for (ControllerContext context : getUsedContexts(this))
@@ -398,4 +407,20 @@
 
       return super.getHeaders(locale);
    }
+
+   @Override
+   protected void afterServiceRegistration(OSGiServiceState service)
+   {
+      OSGiBundleManager manager = getBundleManager();
+      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+      plugin.putContext(service, getDeploymentUnit());
+   }
+
+   @Override
+   protected void beforeServiceUnregistration(OSGiServiceState service)
+   {
+      OSGiBundleManager manager = getBundleManager();
+      ControllerContextPlugin plugin = manager.getPlugin(ControllerContextPlugin.class);
+      plugin.removeContext(service, getDeploymentUnit());
+   }
 }

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceReferenceWrapper.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -49,6 +49,11 @@
       this.serviceState = serviceState;
    }
 
+   ControllerContext getContext()
+   {
+      return getServiceState();
+   }
+
    public Bundle getBundle()
    {
       return serviceState.getBundle();
@@ -97,13 +102,13 @@
       return serviceState.toString();
    }
 
+   /**
+    * Get the serviceState.
+    * 
+    * @return the serviceState.
+    */
    OSGiServiceState getServiceState()
    {
       return serviceState;
    }
-
-   ControllerContext getContext()
-   {
-      return getServiceState();
-   }
 }

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/PreInstallAction.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -36,6 +36,7 @@
       if (install)
       {
          repository.addMetaData(context);
+         repository.getMetaData(context); // TODO - remove this once we fix it in MC core
       }
       else
       {

Modified: 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-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/ServiceManagerPluginImpl.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -72,29 +72,36 @@
 public class ServiceManagerPluginImpl extends AbstractPlugin implements ServiceManagerPlugin
 {
    // Provide logging
-   private final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
+   final Logger log = Logger.getLogger(ServiceManagerPluginImpl.class);
 
    /** The kernel */
    private Kernel kernel;
-   /** The mdr factory */
-   private MetaDataRetrievalFactory factory;
    /** The previous context tracker */
    private ContextTracker previousTracker;
-
+   /** Enable MDR usage */
+   private boolean enableMDRUsage = true;
+   
    public ServiceManagerPluginImpl(OSGiBundleManager bundleManager)
    {
       super(bundleManager);
    }
 
+   public void setEnableMDRUsage(boolean mdrUsage)
+   {
+      this.enableMDRUsage = mdrUsage;
+   }
+
    public void start()
    {
       kernel = getBundleManager().getKernel();
-      applyMDRUsage(true);
+      if (enableMDRUsage == true)
+         applyMDRUsage(true);
    }
 
    public void stop()
    {
-      applyMDRUsage(false);
+      if (enableMDRUsage == true)
+         applyMDRUsage(false);
    }
 
    public ServiceReference[] getRegisteredServices(AbstractBundleState bundleState)
@@ -211,29 +218,19 @@
          throw new RuntimeException(t);
       }
 
-      if (bundleState instanceof OSGiBundleState)
-      {
-         ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
-         plugin.putContext(result, ((OSGiBundleState)bundleState).getDeploymentUnit());
-      }
+      FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
+      plugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
 
-      FrameworkEventsPlugin eventsPlugin = getPlugin(FrameworkEventsPlugin.class);
-      eventsPlugin.fireServiceEvent(bundleState, ServiceEvent.REGISTERED, result);
-      
       return result;
    }
 
    public void unregisterService(OSGiServiceState serviceState)
    {
       AbstractBundleState bundleState = serviceState.getBundleState();
-      if (bundleState instanceof OSGiBundleState)
-      {
-         ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
-         plugin.removeContext(serviceState, ((OSGiBundleState)bundleState).getDeploymentUnit());
-      }
-
+      
       Controller controller = kernel.getController();
       controller.uninstall(serviceState.getName());
+
       serviceState.internalUnregister();
 
       FrameworkEventsPlugin plugin = getPlugin(FrameworkEventsPlugin.class);
@@ -253,12 +250,6 @@
       return bundleState.removeContextInUse(context);
    }
 
-   public void unregisterServices(AbstractBundleState bundleState)
-   {
-      ControllerContextPlugin plugin = getPlugin(ControllerContextPlugin.class);
-      plugin.unregisterContexts(bundleState);
-   }
-
    /**
     * Apply OSGi's MDR usage:
     * - add/remove system bundle as default context tracker
@@ -321,15 +312,12 @@
 
    private MetaDataRetrievalFactory getMetaDataRetrievalFactory()
    {
-      MetaDataRetrievalFactory mdrFactory = factory;
-      if (mdrFactory == null)
-      {
-         InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(kernel);
-         imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
-         imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
-         // add JMX via configuration, as we don't wanna depend on JMX code
-         mdrFactory = imdrf;
-      }
+      MetaDataRetrievalFactory mdrFactory;
+      InstanceMetaDataRetrievalFactory imdrf = new InstanceMetaDataRetrievalFactory(kernel);
+      imdrf.addFactory(new OSGiServiceStateDictionaryFactory());
+      imdrf.addFactory(new KernelDictionaryFactory(kernel.getConfigurator()));
+      // TODO - JMX?
+      mdrFactory = imdrf;
       return mdrFactory;
    }
 
@@ -414,7 +402,7 @@
     */
    private boolean hasPermission(ControllerContext context)
    {
-      // TODO - make this generic, w/o casting
+      // TODO - make thisa generic, w/o casting
       if (context instanceof OSGiServiceState)
       {
          OSGiServiceState serviceState = (OSGiServiceState)context;
@@ -422,14 +410,4 @@
       }
       return true;
    }
-
-   /**
-    * Set mdr factory.
-    *
-    * @param factory the factory
-    */
-   public void setFactory(MetaDataRetrievalFactory factory)
-   {
-      this.factory = factory;
-   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/ServiceManagerPlugin.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -140,10 +140,4 @@
     * 
     */
    void unregisterService(OSGiServiceState serviceState);
-
-   /**
-    * Unregister all services that were registered on behalf of the given bundle. 
-    * @param bundleState The bundle that registered the services.
-    */
-   void unregisterServices(AbstractBundleState bundleState);
 }
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -25,16 +25,12 @@
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
 import org.jboss.deployers.client.spi.Deployment;
 import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
 import org.jboss.virtual.AssembledDirectory;
 import org.jboss.virtual.VirtualFile;
 import org.jboss.osgi.framework.bundle.AbstractDeployedBundleState;
 import org.jboss.osgi.framework.bundle.OSGiBundleState;
 import org.osgi.framework.Bundle;
 
-import javax.management.ObjectName;
-
 /**
  * Deployers test - generic deployment test.
  *
@@ -97,29 +93,6 @@
       return addBean(name, beanClass, null, references);
    }
 
-   protected Deployment addJMX(String name, Class<?> serviceClass, String serviceName, ServiceMetaData smd, Class<?> ... references) throws Exception
-   {
-      AssembledDirectory dir = createAssembledDirectory(name, "");
-      if (serviceClass != null)
-         addPackage(dir, serviceClass);
-      if (references != null)
-      {
-         for (Class<?> reference : references)
-            addPackage(dir, reference);
-      }
-      if (smd == null)
-      {
-         if (serviceClass == null)
-            throw new IllegalArgumentException("Null service class");
-         
-         smd = new ServiceMetaData();
-         smd.setConstructor(new ServiceConstructorMetaData());
-         smd.setCode(serviceClass.getName());
-         smd.setObjectName(ObjectName.getInstance(serviceName));
-      }
-      return addDeployment(dir, smd, ServiceMetaData.class);
-   }
-
    protected Deployment addBean(String name, Class<?> beanClass, BeanMetaData bmd, Class<?> ... references) throws Exception
    {
       AssembledDirectory dir = createAssembledDirectory(name, "");

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -22,25 +22,9 @@
 package org.jboss.test.osgi.service;
 
 import junit.framework.Test;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.dependency.spi.ControllerState;
-import org.jboss.deployers.client.spi.Deployment;
-import org.jboss.system.metadata.ServiceAttributeMetaData;
-import org.jboss.system.metadata.ServiceConstructorMetaData;
-import org.jboss.system.metadata.ServiceInjectionValueMetaData;
-import org.jboss.system.metadata.ServiceMetaData;
-import org.jboss.test.osgi.service.support.LazyBundle;
 import org.jboss.test.osgi.service.support.MockInvokerMBean;
-import org.jboss.test.osgi.service.support.a.A;
-import org.jboss.test.osgi.service.support.c.C;
-import org.jboss.virtual.AssembledDirectory;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.ServiceReference;
-import org.osgi.framework.ServiceRegistration;
 
 import javax.management.ObjectName;
-import java.util.Hashtable;
 
 /**
  * Test MC's jmx support.
@@ -70,101 +54,6 @@
 
    public void testMBeans() throws Throwable
    {
-      AssembledDirectory mix = createAssembledDirectory("jmx1", "");
-      addPath(mix, "/bundles/service/service-jmx1", "");
-      addPackage(mix, A.class);
-      Deployment deployment = addDeployment(mix);
-      try
-      {
-         checkComplete();
-
-         Bundle bundle = getBundle(getDeploymentUnit(deployment));
-         bundle.start();
-
-         Object a = getService("test:service=A");
-         assertNotNull(a);         
-
-         ServiceReference[] refs = bundle.getRegisteredServices();
-         assertNotNull(refs);
-         assertEquals(1, refs.length);
-         ServiceReference ref = refs[0];
-         assertEquals(bundle, ref.getBundle());
-         assertEquals("test:service=A", ref.getProperty("bean.name"));
-         Class<?> aClass = bundle.loadClass(A.class.getName());
-         BundleContext bc = bundle.getBundleContext();
-         assertNotNull(bc);
-         Object service = bc.getService(ref);
-         assertInstanceOf(service, aClass, false);
-         assertSame(service, a);
-         assertFalse(bc.ungetService(ref));
-      }
-      finally
-      {
-         undeploy(deployment);
-      }
+      // mix mbean services with bundles -- TODO
    }
-
-   public void testInjectionIntoJMX() throws Throwable
-   {
-      ServiceMetaData smd = new ServiceMetaData();
-      smd.setConstructor(new ServiceConstructorMetaData());
-      smd.setCode(C.class.getName());
-      smd.setObjectName(ObjectName.getInstance("test:service=C"));
-      ServiceAttributeMetaData attrib = new ServiceAttributeMetaData();
-      attrib.setName("A");
-      attrib.setValue(new ServiceInjectionValueMetaData("A"));
-      smd.addAttribute(attrib);
-      Deployment bean = addJMX("jmxA", C.class, null, smd, A.class);
-      try
-      {
-         ControllerContext context = getServiceContext("test:service=C", null);
-
-         Bundle bundle1 = installBundle(assembleBundle("simple2", "/bundles/service/service-bundle3"));
-         try
-         {
-            bundle1.start();
-            BundleContext bundleContext1 = bundle1.getBundleContext();
-            assertNotNull(bundleContext1);
-
-            Class<?> aClass = bundle1.loadClass(A.class.getName());
-            Object a = aClass.newInstance();
-            Hashtable<String, Object> table = new Hashtable<String, Object>();
-            table.put("service.alias.1", "A");
-            ServiceRegistration reg1 = bundleContext1.registerService(A.class.getName(), a, table);
-            assertNotNull(reg1);
-            try
-            {
-               checkComplete();
-
-               Object c = getService("test:service=C");
-               assertSame(a, getter(c, "getA", "test:service=C"));
-
-               ServiceReference ref1 = bundleContext1.getServiceReference(A.class.getName());
-               assertUsingBundles(ref1, LazyBundle.getBundle(getDeploymentUnit(bean)));
-
-               changeContext(context, ControllerState.DESCRIBED);
-               // we did un-injection, should be removed now
-               assertUsingBundles(ref1);
-
-               changeContext(context, ControllerState.INSTALLED);
-               assertEquals(ControllerState.INSTALLED, context.getState());
-            }
-            finally
-            {
-               reg1.unregister();
-            }
-
-            // check if the bean was unwinded as well
-            assertEquals(ControllerState.INSTANTIATED, context.getState());
-         }
-         finally
-         {
-            uninstall(bundle1);
-         }
-      }
-      finally
-      {
-         undeploy(bean);
-      }
-   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -429,7 +429,6 @@
          assertEquals(1, refs.length);
          ServiceReference ref = refs[0];
          assertEquals(bundle, ref.getBundle());
-         assertEquals("A", ref.getProperty("bean.name"));
          Class<?> aClass = bundle.loadClass(A.class.getName());
          BundleContext bc = bundle.getBundleContext();
          assertNotNull(bc);

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -24,8 +24,6 @@
 import junit.framework.Test;
 import org.jboss.beans.metadata.spi.BeanMetaData;
 import org.jboss.beans.metadata.spi.builder.BeanMetaDataBuilder;
-import org.jboss.dependency.spi.Controller;
-import org.jboss.dependency.spi.ControllerContext;
 import org.jboss.dependency.spi.ControllerState;
 import org.jboss.deployers.client.spi.Deployment;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
@@ -52,8 +50,6 @@
  */
 public abstract class ServicesTest extends DeployersTest
 {
-   private static final String ANCHOR = "OSGiBundleManager";
-
    public ServicesTest(String name)
    {
       super(name);
@@ -75,30 +71,4 @@
       Method m = clazz.getDeclaredMethod(setter, value.getClass());
       return m.invoke(target, value);
    }
-
-   private Controller getController() throws Throwable
-   {
-      KernelControllerContext kcc = getControllerContext(ANCHOR);
-      assertNotNull(kcc);
-      return kcc.getController();
-   }
-
-   protected ControllerContext getServiceContext(Object name, ControllerState state) throws Throwable
-   {
-      Controller controller = getController();
-      return controller.getContext(name, state);
-   }
-
-   protected Object getService(Object name) throws Throwable
-   {
-      ControllerContext context = getServiceContext(name, ControllerState.INSTALLED);
-      assertNotNull(context);
-      return context.getTarget(); 
-   }
-
-   protected void changeContext(ControllerContext context, ControllerState state) throws Throwable
-   {
-      Controller controller = getController();
-      controller.change(context, state);      
-   }
 }
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -27,7 +27,7 @@
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision: 1.1 $
  */
-public class A implements AMBean
+public class A
 {
    public String msg;
    private int x;

Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,38 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2009, Red Hat Middleware LLC, and individual contributors
-* as indicated by the @author tags. See the copyright.txt file 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.test.osgi.service.support.a;
-
-/**
- * A mbean.
- *
- * @author <a href="ales.justin at jboss.org">Ales Justin</a>
- */
-public interface AMBean
-{
-   String getMsg();
-
-   void setMsg(String msg);
-
-   void calc(int x);
-
-   int getX();
-}
\ No newline at end of file

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -26,7 +26,7 @@
 /**
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
-public class C implements CMBean
+public class C
 {
    private A a;
    private String msg;

Deleted: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java	2010-02-10 10:39:45 UTC (rev 100793)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.test.osgi.service.support.c;
-
-import org.jboss.test.osgi.service.support.a.A;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
- */
-public interface CMBean
-{
-   A getA();
-
-   void setA(A a);
-
-   String getMsg();
-
-   void setMsg(String msg);
-}
\ No newline at end of file

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-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml	2010-02-10 10:39:45 UTC (rev 100793)
@@ -62,7 +62,6 @@
   </bean>
   <bean name="OSGiServiceManagerPlugin" class="org.jboss.osgi.framework.bundle.ServiceManagerPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
-    <property name="factory"><inject bean="InstanceMDRFactory"/></property>
   </bean>
   <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
@@ -70,19 +69,7 @@
   <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
     <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
   </bean>
-
-  <bean name="InstanceMDRFactory" class="org.jboss.osgi.framework.bundle.InstanceMetaDataRetrievalFactory">
-    <constructor><parameter><inject bean="jboss.kernel:service=Kernel"/></parameter></constructor>
-    <incallback method="addFactory"/>
-    <uncallback method="removeFactory"/>
-  </bean>
-  <bean name="OSGiDictionaryFactory" class="org.jboss.osgi.framework.bundle.OSGiServiceStateDictionaryFactory"/>
-  <bean name="KernelDictionaryFactory" class="org.jboss.osgi.framework.bundle.KernelDictionaryFactory">
-      <constructor>
-          <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
-      </constructor>
-  </bean>
-
+  
   <!-- 
   ********************************
   *                              *  

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml	2010-02-10 10:39:45 UTC (rev 100793)
@@ -12,15 +12,8 @@
     <bean name="ServiceDeploymentDeployer" class="org.jboss.system.deployers.ServiceDeploymentDeployer"/>
     <bean name="ServiceDeployer" class="org.jboss.system.deployers.ServiceDeployer">
         <constructor><parameter><inject bean="JMXKernel" property="serviceController"/></parameter></constructor>
-        <property name="deploymentRegistry"><inject bean="OSGiDeploymentRegistry"/></property>
     </bean>
 
-    <bean name="JMXDictionaryFactory" class="org.jboss.osgi.framework.bundle.JMXDictionaryFactory">
-        <constructor>
-            <parameter><inject bean="jboss.kernel:service=KernelConfigurator"/></parameter>
-        </constructor>
-    </bean>
-
     <!-- Intercept all annotation plugings -->
 
     <bean name="BeanAnnotationAdapterFactory" class="org.jboss.kernel.plugins.annotations.BeanAnnotationAdapterFactory">

Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2010-02-10 09:47:36 UTC (rev 100792)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/installer/install-definition.xml	2010-02-10 10:39:45 UTC (rev 100793)
@@ -412,7 +412,7 @@
         <include name="jboss-osgi-jndi.jar" />
         <include name="jboss-osgi-webconsole.jar" />
         <include name="jboss-osgi-reflect.jar" />
-        <include name="jboss-osgi-serviceloader.jar" />
+        <!-- include name="jboss-osgi-serviceloader.jar" / -->
         <include name="jboss-osgi-xml-binding.jar" />
         <include name="org.apache.aries.blueprint.jar" />
         <include name="org.apache.aries.util.jar" />
@@ -489,5 +489,26 @@
 
     </pack>
 
+    <!--
+      ********************************* 
+      *                               *
+      * JBossAS Overwrites            *
+      *                               *
+      *********************************
+    -->
+
+    <!-- 
+       This pack MUST NOT be part of an JBoss OSGi release 
+    - ->
+    <pack name="JBossMC SNAPSHOT overwrites" required="no" preselected="yes">
+      <description>Temporarily overwrite AS provided jars with SNAPSHOT versions</description>
+      
+      <fileset condition="isJBossMC" dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/lib"
+        override="true">
+        <include name="jboss-jmx-mc-int.jar" />
+      </fileset>
+    </pack>
+    -->
+    
   </packs>
 </installation>
\ No newline at end of file




More information about the jboss-cvs-commits mailing list