I am not aware of any support in -runbundles to set start levels for bundle. But the bnd launcher should start the bundle in the order they are specified on the -runbundles instruction. Did you try putting those bundles first that need to be started first?
 
--

BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
OSGi Fellow and CTO of the OSGi Alliance // mobile: +1 386 848 3788
hargr...@us.ibm.com
 
 
----- Original message -----
From: Elliot Huntington <elliot.hunting...@gmail.com>
Sent by: osgi-dev-boun...@mail.osgi.org
To: OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Cc:
Subject: [osgi-dev] Strange issue with enRoute and Aries SPI Fly.
Date: Mon, Dec 5, 2016 1:35 PM
 
The motivation for this thread is that I am experimenting with an OSGi enRoute project that uses the Apache Aries SPI-Fly dynamic weaving libraries to play an MP3 file. The example project is on github at: https://github.com/axiopisty/com.github.axiopisty.plarpebu. This project has 5 enRoute modules:
  • JavaFX API
  • JavaFX API Provider
  • Media Player API
  • Media Player API Provider
  • Application

What I have noticed is that when I use 'osgi.enroute.debug.api' I can use the debug commands in the gogo shell to successfully load, play, pause, and stop the media player. The application will successfully play an MP3 file. However, when using the GUI to 'load' the MP3 file an exception occurs that indicates something is not working right with the SPI Fly dynamic weaving integration. I have not been able to figure out why the 'load' operation works successfully when using the gogo shell, but does not work when called from the GUI. I'm wondering if it might have something to do with the bundle start levels because according to the SPI Fly documentation, "any OSGi Bundle that uses the OSGi 4.3 WeavingHooks, the weaver bundle (org.apache.aries.spifly.dynamic.bundle) needs to be active before any bundles that need to be dynamically woven. OSGi start levels can provide a mechanism to control this."

My suspicion is that because the JavaFX provider is a DS component with scope SINGLETON and immediate = true, that this bundle is activated before the dynamic weaving bundle in the runtime, which is probably causing the problem described.

So my question is, when using bnd, is there some directive or syntax that can be used with the -runbundles directive that indicates the bundle start level?
 
I would greatly appreciate your help figuring out why the media player service I created in this example works successfully from the gogo shell, but not from the gui, all within the same runtime application.
 
Sincerely,
Elliot
 
 
_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev
 

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to