OSGi Configuration Admin Service
This page collects all the original posts appeared in the OSGi Look on this topic. Check also the OSGi Recipes for more articles and tutorials
The OSGi Configuration Admin Service is defined in Chapter 104 of the OSGi Compendium Specification.
Its goal is to provide a consistent method to define configurations in a OSGi application; such configurations are dynamically installable and updatable in the OSGi platform.
Available implementations:
The ManagedService interface
As chapter 104.1 of the OSGi compendium specification states:
The Configuration Admin service is an important aspect of the deployment
of an OSGi Service Platform. It allows an Operator to set the configuration
information of deployed bundles.
Configuration is the process of defining the configuration data of bundles
and assuring that those bundles receive that data when they are active in the
OSGi Service Platform.
In simple words, the Configuration Admin service provides…
Factory pattern on steroids: the ManagedServiceFactory
A few months ago we explored the OSGi Configuration Admin Service, and the ManagedService interface in particular, to see how it is possible to create dynamically configurable services with OSGi.
The second important interface exposed by the Configuration Admin Service is the ManagedServiceFactory; as the name suggests, its purpose is…
A command line client for the Configuration Admin Service
In our introductory articles on the OSGi Configuration Admin Service, we explained how to programmatically access to the OSGi ConfigurationAdmin interface to send configuration dictionaries to bundles installed in your OSGi framework.
Of course that’s just one possible usage scenario of the Configuration Admin Service. In many cases, however, you want to give your customer (or the deployment team) the opportunity to configure your system directly, and writing some Java code is not the most practical solution. In these cases, there are some tools that make it easy to use the Configuration Admin Service.
Apache Felix File Install and the Configuration Admin Service
Another interesting feature of the File Install bundle is its ability to load property files and send them to the OSGi ConfigurationAdmin service; that’s very useful if you want to be able to configure your applications just creating/deleting and updating properties file at runtime. In this post I’ll enhance the project presented in the previous article to include this new functionality.
