Hi,
I would like to implement a management bundle which displays the
properties defined by other bundles/SCR components.
To try this approach I wrote a simple bundle with one component and a
simple property as follows:
/*
* @scr.component
*
* @scr.service
*/
public class ComponentWithConf implements EmptyService{
/** scr.property value="defaultvalue"*/
private static final String MYPROP = "myprop";
...
}
The Management Bundle looks like this:
/*
* @scr.component
*/
public class ManagementComponent {
/**
* @scr.reference
*/
private ConfigurationAdmin mConfigurationAdmin;
proteced void activate (ComponentContext pContext){
Configuration[] lConfigurations =
mConfigurationAdmin.listConfigurations(null);
if (lConfigurations.length() == 0)
System.out.println ("No conf found!");
}
}
The problem is, that I don't see any configurations from my
ManagementComponent. The above activate - method always prints "No conf
found!" on the console.
Am I missing something? Is this a bug?
Thanks for help,
Martin
P.S.: I'm using
org.apache.felix.configadmin 1.0.1
org.apache.felix.scr 1.0.0
maven-bundle-plugin 1.2.0
maven-scr-plugin 1.0.3