OSGi 配置管理服务的现有实现?
我们正在考虑使用配置管理服务作为主要 API,用于配置基于 OSGi 的应用程序中的组件。 如果我们可以重用一些现有的实现,那就太好了,所以我正在尝试调查和评估最受欢迎的实现。 我知道有:
- Apache Felix Config Admin (org .apache.felix.cm)
- Equinox 配置管理 (org.eclipse.equinox.cm)
是还有其他实施方案需要考虑吗?
此外,我找不到这些实现的任何好的文档。 我主要对特定于实现的细节感兴趣。 例如,我想知道不同的实现如何保留配置数据(例如多个属性文件?XML 文件?多个XML 文件?数据库?...)。
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 implementation so I'm trying to investigate and evaluate the most popular ones. I know there is:
- Apache Felix Config Admin (org.apache.felix.cm)
- Equinox Config Admin (org.eclipse.equinox.cm)
Are there any other implementations to be considered?
Also I was not able to find any good documentation for these implementations. I would be mainly interested in the implementation-specific details. For example I was wondering how different implementations persist the configuration data (e.g. multiple property files? XML file? multiple XML files? database?, ...).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Felix 的配置管理有一个 默认实现 持久保存到文件系统,但它们定义了一个服务接口 (org.apache.felix.cm.PersistenceManager)用于您可以插入的替代后端。
默认实现执行以下操作:
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:
我知道的三个公共实现是
Equinox 的实现
ConfigurationAdmin
服务似乎并不像 Felix 那样支持对持久性策略的精细控制,并且 Knopflerfish 实现看起来(我只是简单地阅读了源代码)与 Equinox 类似。Felix 似乎是最新更新且最可靠的。
目前我能找到的只有这些; 在 dm Server 上,我们决定使用 Felix 的捆绑包,现在可以从 SpringSource Enterprise Bundle Repository< /a>,您可以在其中快速搜索
Apache Felix
或ConfigAdmin
。The three public implementations I know of are
Equinox's implementation of the
ConfigurationAdmin
service appears not to support fine control over the persistence policy, as Felix's does, and the Knopflerfish implementation looks (I've only read the source briefly) similar to Equinox's.The Felix one appears to be the most recently updated and the most reliable.
At present these are the only ones I can find; at dm Server we made the decision to use Felix's bundle, and this is now obtainable from the SpringSource Enterprise Bundle Repository, where you can quick-search for
Apache Felix
orConfigAdmin
.只是为了进一步完成答案:我个人也更喜欢 Felix 实现。 有关如何使用 PersistenceManager 更改后端存储方式的示例,另请参阅 此实现使用标准 Java 属性文件作为后备存储。 有一些限制,但至少允许您将配置与应用程序一起存储,并且与 OSGi 框架实现分开。
Just to complete the answer further: I personally also prefer the Felix implementation. For an example of how to change the way storage occurs at the back-end using a PersistenceManager, see also this implementation that uses standard Java property files as backing storage. Has some limitations, but at least allows you to store your configuration with your application and apart from your OSGi framework implementation.