I'm currently running the Equinox OSGi container from within Eclipse to test and run my Bundle.
I'm looking for the simplest way to pass some runtime parameters to my bundle. The standard way would be to use the ConfigurationAdmin to configure my bundle.
Is there a way to use the Launch Configuration "Arguments" tab to set some properties such that ConfigurationAdmin would pass them to my bundle?
Here is what I tried to do:
On Eclipse documentation I found that properties could be set by setting Java VM argumets:
Properties can be set in the following ways:
- use -DpropName=propValue as a VM argument to the Java VM
- set the desired property in the config.ini file in the appropriate configuration area
So I registered my ManagedService with props.put("service.pid","test");
then added a -Dtest.value=1
VM argument on my Launch Configuration.
Unfortunately this doesn't work: updated
function is called only with null
props (as expected) but not called again with my value=1
property.
Any Idea?