【问题标题】:Store object in Felix framework在 Felix 框架中存储对象
【发布时间】:2014-08-24 09:43:01
【问题描述】:

我有一个包含许多捆绑包的应用程序。事实证明,我需要使用来自 may bundles 的导入,并且我从 maven 收到警告说三个是 bundles 依赖项中的循环。

The projects in the reactor contain a cyclic reference: Edge between 'Vertex{label='bundle1'}' and 'Vertex{label='bundle1'}' introduces to cycle in the graph .................

为了解决导入问题,有没有将对象存储在 Apache Felix 框架中,我可以在每个包中插入和使用它?

【问题讨论】:

    标签: java osgi apache-felix


    【解决方案1】:

    所以你的意思是一个对象实例?您可以将对象实例发布为 OSGi 服务。

    【讨论】:

    • 是的,但是捆绑包将再次具有 maven 依赖项,我再次遇到同样的问题。(我正确吗?)
    • 是的..您需要共享一个类或接口作为 maven 依赖项。只需确保共享模块不依赖于其他模块,那么您应该没有循环。
    • 前段时间写了一篇关于OSGi和OSGi服务的教程。见liquid-reality.de/display/liquid/2011/02/15/…。在那里你可以看到如何处理共享模块(在我的例子中是模型)以及如何发布和使用服务。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-03-23
    • 2015-10-23
    • 2019-03-21
    相关资源
    最近更新 更多