[jboss-cvs] JBossAS SVN: r93025 - in projects/jboss-osgi/trunk: reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint and 14 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Aug 31 09:10:16 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-08-31 09:10:16 -0400 (Mon, 31 Aug 2009)
New Revision: 93025

Added:
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBean.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBeanMBean.java
Removed:
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleB/
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd
Modified:
   projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
   projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
   projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java
   projects/jboss-osgi/trunk/testsuite/example/pom.xml
   projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml
   projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/bundleA/SomeService.java
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
   projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/service/mcservice/mcservice-bundleA.bnd
   projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
Add support for MicrocontainerService to MCFramework

Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/pom.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -71,7 +71,7 @@
               org.jboss.dependency.spi*,
               org.jboss.kernel.spi*,
               org.jboss.osgi.common.log;version=1.0,
-              org.jboss.osgi.microcontainer;version=1.0,
+              org.jboss.osgi.jbossxb;version=2.0,
               org.jboss.osgi.spi;version=1.0,
               org.jboss.osgi.spi.capability;version=1.0,
               org.jboss.osgi.spi.service;version=1.0,

Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,8 +23,9 @@
 
 //$Id$
 
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.jbossxb.XMLBindingCapability;
 import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.capability.MicrocontainerCapability;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 
 /**
@@ -44,6 +45,7 @@
    {
       super (BlueprintService.class.getName());
       
+      addDependency(new XMLBindingCapability());
       addDependency(new MicrocontainerCapability());
       
       addBundle("bundles/jboss-osgi-blueprint.jar");

Modified: projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/container/AbstractManager.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,7 +23,6 @@
 
 //$Id$
 
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_KERNEL_CONTROLLER;
 
 import org.jboss.beans.metadata.spi.BeanMetaData;
 import org.jboss.dependency.spi.ControllerContext;
@@ -31,7 +30,7 @@
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
 import org.jboss.osgi.blueprint.BlueprintContext;
 import org.jboss.osgi.blueprint.reflect.ComponentMetadataImpl;
-import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.blueprint.container.BlueprintContainer;
 import org.osgi.service.blueprint.reflect.ComponentMetadata;
@@ -138,7 +137,7 @@
          throw new IllegalStateException("Cannot obtain MicrocontainerService");
       
       MicrocontainerService service = (MicrocontainerService)context.getBundleContext().getService(sref);
-      KernelController controller = service.getRegisteredBean(KernelController.class, BEAN_KERNEL_CONTROLLER);
+      KernelController controller = service.getRegisteredBean(KernelController.class, MicrocontainerService.BEAN_KERNEL_CONTROLLER);
       if (controller == null)
          throw new IllegalStateException("Cannot obtain KernelController");
       

Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -224,7 +224,6 @@
               <excludes>
                 <exclude>${target.container.excludes}</exclude>
                 <exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
-                <exclude>org/jboss/test/osgi/example/http/**</exclude>
                 <exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
               </excludes>
             </configuration>

Modified: projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/scripts/antrun-test-jars.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -56,7 +56,6 @@
 
     <!-- mcservice -->
     <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-mcservice-bundleA.jar" files="${tests.resources.dir}/mcservice/example-mcservice-bundleA.bnd" />
-    <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-mcservice-bundleB.jar" files="${tests.resources.dir}/mcservice/example-mcservice-bundleB.bnd" />
   	
     <!-- simple -->
     <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/example-simple.jar" files="${tests.resources.dir}/simple/example-simple.bnd" />

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,16 +23,18 @@
 
 //$Id$
 
-import static org.jboss.test.osgi.example.microcontainer.bundleB.SomeBeanMBean.MBEAN_NAME;
+import static org.jboss.test.osgi.example.microcontainer.bundleA.SomeBeanMBean.MBEAN_NAME;
 import static org.junit.Assert.assertEquals;
 
+import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.spi.capability.MicrocontainerCapability;
 import org.jboss.osgi.spi.management.MBeanProxy;
 import org.jboss.osgi.spi.testing.OSGiBundle;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.test.osgi.example.microcontainer.bundleB.SomeBeanMBean;
+import org.jboss.test.osgi.example.microcontainer.bundleA.SomeBeanMBean;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -52,11 +54,11 @@
    {
       runtime = new OSGiTestHelper().getDefaultRuntime();
       runtime.addCapability(new JNDICapability());
+      runtime.addCapability(new JMXCapability());
+      runtime.addCapability(new XMLBindingCapability());
       runtime.addCapability(new MicrocontainerCapability());
       
       OSGiBundle bundleA = runtime.installBundle("example-mcservice-bundleA.jar");
-      runtime.installBundle("example-mcservice-bundleB.jar");
-      
       bundleA.start();
    }
 

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBean.java (from rev 93017, projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleB/SomeBean.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBean.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBean.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -0,0 +1,73 @@
+/*
+ * 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.test.osgi.example.microcontainer.bundleA;
+
+//$Id$
+
+import javax.management.MBeanServer;
+
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceReference;
+
+/**
+ * An MC bean that accesses some OSGi service
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 24-Apr-2009
+ */
+public class SomeBean implements SomeBeanMBean
+{
+   private BundleContext bundleContext;
+   private MBeanServer mbeanServer;
+
+   public void setMbeanServer(MBeanServer server)
+   {
+      this.mbeanServer = server;
+   }
+
+   public void setBundleContext(BundleContext systemContext)
+   {
+      this.bundleContext = systemContext;
+   }
+
+   public String echo(String msg)
+   {
+      return msg;
+   }
+   
+   public String callSomeService(String msg)
+   {
+      ServiceReference sref = bundleContext.getServiceReference(SomeService.class.getName());
+      SomeService service = (SomeService)bundleContext.getService(sref);
+      return service.callSomeBean(msg);
+   }
+
+   public void create() throws Exception
+   {
+      mbeanServer.registerMBean(this, MBEAN_NAME);
+   }
+   
+   public void destroy() throws Exception
+   {
+      mbeanServer.unregisterMBean(MBEAN_NAME);
+   }
+}

Copied: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBeanMBean.java (from rev 93017, projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleB/SomeBeanMBean.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBeanMBean.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeBeanMBean.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -0,0 +1,37 @@
+/*
+ * 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.test.osgi.example.microcontainer.bundleA;
+
+import javax.management.ObjectName;
+
+import org.jboss.osgi.spi.management.ObjectNameFactory;
+
+//$Id$
+
+public interface SomeBeanMBean
+{
+   ObjectName MBEAN_NAME = ObjectNameFactory.create("jboss.osgi:bean=SomeBean");
+   
+   String callSomeService(String msg);
+   
+   String echo(String msg);
+}

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/bundleA/SomeService.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,8 +23,7 @@
 
 //$Id$
 
-import org.jboss.osgi.microcontainer.MicrocontainerService;
-import org.jboss.test.osgi.example.microcontainer.bundleB.SomeBean;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 

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	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -9,7 +9,10 @@
   -->
   
   <bean name="OSGiBundleManager" class="org.jboss.osgi.plugins.facade.bundle.OSGiBundleManager">
-    <constructor><parameter><inject bean="MainDeployer" /></parameter></constructor>
+    <constructor>
+      <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
+      <parameter><inject bean="MainDeployer" /></parameter>
+    </constructor>
     <property name="properties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
         <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/META-INF/mcservice-jboss-beans.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -1,6 +1,6 @@
 <deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
 
-  <bean name="SomeBean" class="org.jboss.test.osgi.example.microcontainer.bundleB.SomeBean">
+  <bean name="SomeBean" class="org.jboss.test.osgi.example.microcontainer.bundleA.SomeBean">
     <property name="bundleContext"><inject bean="jboss.osgi:service=BundleContext"/></property>
     <property name="mbeanServer"><inject bean="jboss.osgi:service=MBeanServer"/></property>
   </bean>

Modified: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleA.bnd	2009-08-31 13:10:16 UTC (rev 93025)
@@ -1,9 +1,8 @@
 # bnd build -classpath target/test-classes -output target/test-libs/example-mcservice-bundleA.jar src/test/resources/mcservice/example-mcservice-bundleA.bnd
 
 Bundle-SymbolicName: example-mcservice-bundleA
-
 Bundle-Activator: org.jboss.test.osgi.example.microcontainer.bundleA.SomeServiceActivator
-
 Export-Package: org.jboss.test.osgi.example.microcontainer.bundleA
-
-Import-Package: org.jboss.test.osgi.example.microcontainer.bundleB, org.jboss.osgi.microcontainer, org.osgi.framework
+Import-Package: org.jboss.osgi.spi.service, org.osgi.framework, javax.management, org.jboss.osgi.spi.management
+Include-Resource: META-INF/mcservice-jboss-beans.xml=META-INF/mcservice-jboss-beans.xml
+-removeheaders: Include-Resource

Deleted: projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/example/src/test/resources/mcservice/example-mcservice-bundleB.bnd	2009-08-31 13:10:16 UTC (rev 93025)
@@ -1,10 +0,0 @@
-# bnd build -classpath target/test-classes -output target/test-libs/mcservice-bundleB.jar src/test/resources/mcservice/mcservice-bundleB.bnd
-
-Bundle-SymbolicName: example-mcservice-bundleB
-
-Export-Package: org.jboss.test.osgi.example.microcontainer.bundleB 
-
-Import-Package: javax.management, org.jboss.osgi.spi.management, org.jboss.test.osgi.example.microcontainer.bundleA, org.osgi.framework
-
-Include-Resource: META-INF/mcservice-jboss-beans.xml=META-INF/mcservice-jboss-beans.xml
--removeheaders: Include-Resource

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -28,7 +28,7 @@
 
 import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
+import org.jboss.osgi.spi.capability.MicrocontainerCapability;
 import org.jboss.osgi.spi.management.MBeanProxy;
 import org.jboss.osgi.spi.management.MBeanProxyException;
 import org.jboss.osgi.spi.testing.OSGiBundle;

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,9 +23,6 @@
 
 //$Id$
 
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_KERNEL;
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_MBEAN_SERVER;
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
 import static org.jboss.osgi.spi.management.ManagedFrameworkMBean.MBEAN_MANAGED_FRAMEWORK;
 import static org.jboss.osgi.spi.management.MicrocontainerServiceMBean.MBEAN_MICROCONTAINER_SERVICE;
 import static org.jboss.osgi.spi.service.DeployerService.MBEAN_DEPLOYER_SERVICE;
@@ -39,13 +36,15 @@
 
 import javax.management.ObjectName;
 
+import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.jmx.JMXCapability;
 import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.microcontainer.MicrocontainerCapability;
-import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.spi.capability.MicrocontainerCapability;
 import org.jboss.osgi.spi.management.MBeanProxy;
 import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
 import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
 import org.jboss.osgi.spi.service.DeployerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.jboss.osgi.spi.testing.OSGiRuntime;
 import org.jboss.osgi.spi.testing.OSGiTest;
 import org.jboss.osgi.spi.testing.OSGiTestHelper;
@@ -69,6 +68,8 @@
    {
       runtime = new OSGiTestHelper().getDefaultRuntime();
       runtime.addCapability(new JNDICapability());
+      runtime.addCapability(new JMXCapability());
+      runtime.addCapability(new XMLBindingCapability());
       runtime.addCapability(new MicrocontainerCapability());
    }
 
@@ -83,9 +84,9 @@
    {
       MicrocontainerServiceMBean mcService = MBeanProxy.get(MicrocontainerServiceMBean.class, MBEAN_MICROCONTAINER_SERVICE, runtime.getMBeanServer());
       List<String> registeredBeans = mcService.getRegisteredBeans();
-      assertTrue("BundleContext registered with MC", registeredBeans.contains(BEAN_SYSTEM_BUNDLE_CONTEXT));
-      assertTrue("MBeanServer registered with MC", registeredBeans.contains(BEAN_MBEAN_SERVER));
-      assertTrue("Kernel registered with MC", registeredBeans.contains(BEAN_KERNEL));
+      assertTrue("BundleContext registered with MC", registeredBeans.contains(MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT));
+      assertTrue("MBeanServer registered with MC", registeredBeans.contains(MicrocontainerService.BEAN_MBEAN_SERVER));
+      assertTrue("Kernel registered with MC", registeredBeans.contains(MicrocontainerService.BEAN_KERNEL));
    }
 
    /**

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/bundleA/SomeService.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/bundleA/SomeService.java	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/bundleA/SomeService.java	2009-08-31 13:10:16 UTC (rev 93025)
@@ -23,9 +23,7 @@
 
 //$Id$
 
-import static org.jboss.osgi.microcontainer.MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT;
-
-import org.jboss.osgi.microcontainer.MicrocontainerService;
+import org.jboss.osgi.spi.service.MicrocontainerService;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 
@@ -44,7 +42,7 @@
       this.context = context;
       
       MicrocontainerService mcService = getMicrocontainerService();
-      BundleContext bundleContext = (BundleContext)mcService.getRegisteredBean(BEAN_SYSTEM_BUNDLE_CONTEXT);
+      BundleContext bundleContext = (BundleContext)mcService.getRegisteredBean(MicrocontainerService.BEAN_SYSTEM_BUNDLE_CONTEXT);
       if (bundleContext == null)
          throw new IllegalStateException("No BundleContext as MC Bean");
    }

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	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -9,7 +9,10 @@
   -->
   
   <bean name="OSGiBundleManager" class="org.jboss.osgi.plugins.facade.bundle.OSGiBundleManager">
-    <constructor><parameter><inject bean="MainDeployer" /></parameter></constructor>
+    <constructor>
+      <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
+      <parameter><inject bean="MainDeployer" /></parameter>
+    </constructor>
     <property name="properties">
       <map keyClass="java.lang.String" valueClass="java.lang.String">
         <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>

Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/service/mcservice/mcservice-bundleA.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/service/mcservice/mcservice-bundleA.bnd	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/service/mcservice/mcservice-bundleA.bnd	2009-08-31 13:10:16 UTC (rev 93025)
@@ -6,4 +6,4 @@
 
 Export-Package: org.jboss.test.osgi.service.microcontainer.bundleA
 
-Import-Package: org.jboss.osgi.microcontainer, org.osgi.framework
+Import-Package: org.jboss.osgi.spi.service, org.osgi.framework

Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml	2009-08-31 12:15:15 UTC (rev 93024)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml	2009-08-31 13:10:16 UTC (rev 93025)
@@ -180,7 +180,7 @@
         </property>
       </activation>
       
-      <!-- default to jbossmc 
+      <!-- default to jbossmc -->
       <dependencies>
         <dependency>
           <groupId>org.jboss.osgi.runtime</groupId>
@@ -189,9 +189,8 @@
           <scope>provided</scope>
         </dependency>
       </dependencies>
-      -->
       
-      <!-- default to felix -->    
+      <!-- default to felix     
       <dependencies>
         <dependency>
           <groupId>org.jboss.osgi.runtime</groupId>
@@ -200,6 +199,7 @@
           <scope>provided</scope>
         </dependency>
       </dependencies>
+      -->
       
     </profile>
 




More information about the jboss-cvs-commits mailing list