@Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY, policy = ReferencePolicy.STATIC)
private ConfigurationAdmin configAdmin;
try {
Configuration[] confArray = configAdmin.listConfigurations("(service.factoryPid= com.service.config.impl.ConfigFactoryServiceImpl)");
//Retrieve the configurations - Iterate through confArray
final Configuration conf = confArray[0];
final String property1 = (String) conf.getProperties().get("property1");
} catch (Exception e) {
}
service.factoryPid:
private ConfigurationAdmin configAdmin;
try {
Configuration[] confArray = configAdmin.listConfigurations("(service.factoryPid= com.service.config.impl.ConfigFactoryServiceImpl)");
//Retrieve the configurations - Iterate through confArray
final Configuration conf = confArray[0];
final String property1 = (String) conf.getProperties().get("property1");
} catch (Exception e) {
}
service.factoryPid:
No comments:
Post a Comment
If you have any doubts or questions, please let us know.