Existing implementations of OSGi Configuration Admin Service?

后端 未结 3 1308
死守一世寂寞
死守一世寂寞 2021-02-20 06:35

We are considering to use Configuration Admin Service as a primary API for configuring components in our OSGi-based application. It would be nice if we could reuse some existing

3条回答
  •  生来不讨喜
    2021-02-20 07:28

    Felix's Configuration Admin has a default implementation that persists to the file system, but they define a service interface (org.apache.felix.cm.PersistenceManager) for alternative backends that you could plug in instead.

    The default implementation does the following:

    The FilePersistenceManager class stores configuration data in properties-like files inside a given directory. All configuration files are located in the same directory.

    Configuration files are created in the configuration directory by appending the extension ".config" to the PID of the configuration. The PID is converted into a relative path name by replacing enclosed dots to slashes. Non-symbolic-name characters in the PID are encoded with their Unicode character code in hexadecimal.

提交回复
热议问题