[jboss-osgi-commits] JBoss-OSGI SVN: r94471 - projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/classloading.

jboss-osgi-commits at lists.jboss.org jboss-osgi-commits at lists.jboss.org
Wed Oct 7 12:43:59 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-10-07 12:43:58 -0400 (Wed, 07 Oct 2009)
New Revision: 94471

Modified:
   projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/classloading/BundleClassPathTest.java
Log:
[JBOSGI-162] Cannot load classes from Bundle-ClassPath
Use bootstrap provider

Modified: projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/classloading/BundleClassPathTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/classloading/BundleClassPathTest.java	2009-10-07 16:39:35 UTC (rev 94470)
+++ projects/jboss-osgi/projects/runtime/microcontainer/trunk/src/test/java/org/jboss/test/osgi/classloading/BundleClassPathTest.java	2009-10-07 16:43:58 UTC (rev 94471)
@@ -22,15 +22,14 @@
 package org.jboss.test.osgi.classloading;
 
 import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 
+import org.jboss.osgi.spi.framework.OSGiBootstrap;
+import org.jboss.osgi.spi.framework.OSGiBootstrapProvider;
 import org.jboss.osgi.spi.testing.OSGiTest;
-import org.jboss.osgi.spi.util.ServiceLoader;
 import org.junit.Test;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.launch.Framework;
-import org.osgi.framework.launch.FrameworkFactory;
 
 /**
  * BundleClassPathTest.
@@ -43,9 +42,8 @@
    @Test
    public void testBundleClassPath() throws Exception
    {
-      // Uses the OSGi Framework launch API
-      FrameworkFactory factory = ServiceLoader.loadService(FrameworkFactory.class);
-      Framework framework = factory.newFramework(null);
+      OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
+      Framework framework = bootProvider.getFramework();
       framework.start();
 
       BundleContext sysContext = framework.getBundleContext();



More information about the jboss-osgi-commits mailing list