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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Feb 5 11:16:20 EST 2010


Author: alesj
Date: 2010-02-05 11:16:19 -0500 (Fri, 05 Feb 2010)
New Revision: 100540

Added:
   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/
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/MANIFEST.MF
   projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/jboss-service.xml
Modified:
   projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
   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
Log:
[JBOSGI-141]; test JMX mix.

Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml	2010-02-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml	2010-02-05 16:16:19 UTC (rev 100540)
@@ -49,7 +49,7 @@
     <version.drools>5.0.1</version.drools>
     <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.Alpha5</version.jboss.kernel>
+    <version.jboss.kernel>2.2.0-SNAPSHOT</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>

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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/DeployersTest.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -25,12 +25,16 @@
 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.
  *
@@ -93,6 +97,29 @@
       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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/JMXServicesUnitTestCase.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -22,9 +22,25 @@
 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.
@@ -54,6 +70,101 @@
 
    public void testMBeans() throws Throwable
    {
-      // mix mbean services with bundles -- TODO
+      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")); // TODO - add JMX MDR describe action
+         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);
+      }
    }
+
+   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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -429,6 +429,7 @@
          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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServicesTest.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -24,6 +24,8 @@
 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;
@@ -50,6 +52,8 @@
  */
 public abstract class ServicesTest extends DeployersTest
 {
+   private static final String ANCHOR = "OSGiBundleManager";
+
    public ServicesTest(String name)
    {
       super(name);
@@ -71,4 +75,30 @@
       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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/A.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -27,7 +27,7 @@
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision: 1.1 $
  */
-public class A
+public class A implements AMBean
 {
    public String msg;
    private int x;

Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java (from rev 100483, 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/AMBean.java	                        (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/a/AMBean.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -0,0 +1,38 @@
+/*
+* 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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/C.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -26,7 +26,7 @@
 /**
  * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
  */
-public class C
+public class C implements CMBean
 {
    private A a;
    private String msg;

Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java (from rev 100483, 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/CMBean.java	                        (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/support/c/CMBean.java	2010-02-05 16:16:19 UTC (rev 100540)
@@ -0,0 +1,38 @@
+/*
+ * 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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml	2010-02-05 16:16:19 UTC (rev 100540)
@@ -62,6 +62,7 @@
   </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>
@@ -69,7 +70,19 @@
   <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>
+
   <!-- 
   ********************************
   *                              *  

Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/MANIFEST.MF (from rev 100483, projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/MANIFEST.MF	                        (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/MANIFEST.MF	2010-02-05 16:16:19 UTC (rev 100540)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Implementation-Title: JBoss OSGi tests
+Implementation-Version: test
+Implementation-Vendor: jboss.org
+Bundle-Name: Beans1
+Bundle-SymbolicName: org.jboss.test.osgi.beans1
+Export-Package: org.jboss.test.osgi.service.support.a

Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/jboss-service.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/jboss-service.xml	                        (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-jmx1/META-INF/jboss-service.xml	2010-02-05 16:16:19 UTC (rev 100540)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+
+ <mbean code="org.jboss.test.osgi.service.support.a.A" name="test:service=A" />
+
+</server>
\ No newline at end of file

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-05 16:16:09 UTC (rev 100539)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/org/jboss/test/osgi/service/JMXServicesUnitTestCase.xml	2010-02-05 16:16:19 UTC (rev 100540)
@@ -12,8 +12,15 @@
     <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">




More information about the jboss-cvs-commits mailing list