[jboss-cvs] JBossAS SVN: r87167 - projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Apr 11 15:55:39 EDT 2009


Author: thomas.diesler at jboss.com
Date: 2009-04-11 15:55:38 -0400 (Sat, 11 Apr 2009)
New Revision: 87167

Modified:
   projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
Log:
Use low-level OSGi API

Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java	2009-04-11 19:44:28 UTC (rev 87166)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/example/log/LogServiceTestCase.java	2009-04-11 19:55:38 UTC (rev 87167)
@@ -23,6 +23,7 @@
 
 //$Id$
 
+import java.net.URL;
 import java.util.List;
 
 import org.jboss.osgi.service.log.LogEntryCache;
@@ -30,6 +31,7 @@
 import org.jboss.osgi.spi.framework.OSGiBootstrap;
 import org.jboss.osgi.spi.framework.OSGiFramework;
 import org.jboss.osgi.spi.junit.OSGiTest;
+import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
 import org.osgi.framework.ServiceReference;
 import org.osgi.service.log.LogEntry;
@@ -69,10 +71,14 @@
       tracker.open();
 
       // Install and start the 3rd party LogService.   
-      installBundle(sysContext, "thirdparty/org.apache.felix.log.jar", true);
+      URL testURL = getTestArchiveURL("thirdparty/org.apache.felix.log.jar");
+      Bundle logServiceBundle = sysContext.installBundle(testURL.toExternalForm());
+      logServiceBundle.start();
 
       // Install and start the test bundle
-      installBundle(sysContext, "example/example-log-bundleA.jar", true);
+      testURL = getTestArchiveURL("example/example-log-bundleA.jar");
+      Bundle bundleA = sysContext.installBundle(testURL.toExternalForm());
+      bundleA.start();
 
       // Verify the received log entries
       List<LogEntry> entries = logEntryCache.getLog();




More information about the jboss-cvs-commits mailing list