Blueprint allows us to externalize some configuration elements from our code; we can take this to the next level by taking advantage of the OSGi configuration administration service (generally referred to as Configuration Admin).
The Configuration Admin service provides configuration properties to services in an OSGi container. In Apache Karaf, this functionality is improved by including the Apache Felix File Install directory-based management agent. File Install monitors a directory and can automatically install and start a bundle or make a configuration file update to Configuration Admin.
Note
Apache Felix File Install provides the magic behind Karaf's deploy
and etc
folders, automatically handling files as they are added, removed, or updated.
In this recipe, we'll integrate the Configuration Admin service into our Blueprint-based Camel project.