karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steinar Bang ...@dod.no>
Subject What's the recommended way of reading configuration?
Date Sun, 03 Dec 2017 08:41:26 GMT
What's the recommended way for an OSGi bundle running inside karaf to
access its configuration?

Get an OSGi service of type ConfigMBean[1]?
Get an OSGi servie of type ConfigRepository[2]?

Or maybe avoid karaf dependencies, and get an OSGi service of type
ConfigurationAdmin[3]...?

Does anyone know of code examples of any of the three approaches?
Preferrably DS w/annotation based code examples?


Thanks!


- Steinar

References:
[1] <https://github.com/apache/karaf/blob/master/config/src/main/java/org/apache/karaf/config/core/ConfigMBean.java>
[2] <https://github.com/apache/karaf/blob/master/config/src/main/java/org/apache/karaf/config/core/ConfigRepository.java>
[3] <https://osgi.org/javadoc/r4v42/org/osgi/service/cm/ConfigurationAdmin.html>


Mime
View raw message