尽管所有参考资料都得到满足,Karaf 仍将我的捆绑包显示为 UNSATISFIED。
我正在使用以下三个组件 - 来自 scr:list 的相关控制台输出:
[20 ] [UNSATISFIED ] com.barchart.news.modules.mysql.MySQLIndex
[16 ] [ACTIVE ] com.barchart.news.server.pipeline.StoryPipeline
[14 ] [ACTIVE ] com.barchart.news.server.common.SharedExecutorProvider
组件 16 和 14 提供以下服务(来自 service:list 的输出):
service:list com.barchart.news.server.pipeline.PipelineService
[com.barchart.news.server.common.ModuleStatus, com.barchart.news.server.pipeline.PipelineService]
-------------------------------------------------------------------------------------------------
component.name = com.barchart.news.server.pipeline.StoryPipeline
component.id = 16
service.id = 348
Provided by :
barchart-news-server (102)
service:list com.barchart.news.server.common.SharedExecutorService
[com.barchart.news.server.common.ModuleStatus, com.barchart.news.server.common.SharedExecutorService]
-----------------------------------------------------------------------------------------------------
component.name = com.barchart.news.server.common.SharedExecutorProvider
component.id = 14
service.id = 346
Provided by :
barchart-news-server (102)
Used by:
barchart-news-server (102)
在这两者都属于的 barchart-news-server 包中,引用被满足并按预期绑定(来自 scr:details 的输出):
scr:details com.barchart.news.server.pipeline.StoryPipeline
Component Details
Name : com.barchart.news.server.pipeline.StoryPipeline
State : ACTIVE
References
Reference : com.barchart.news.server.common.SharedExecutorService/*
State : satisfied
Multiple : single
Optional : mandatory
Policy : static
Service Reference : Bound Service ID 346 (com.barchart.news.server.common.SharedExecutorProvider)
但是,在依赖于这些服务的第二个捆绑包(#20)的组件中,虽然 Karaf 将引用标记为“已满足”,但它不会绑定它们并激活组件:
scr:com.barchart.news.modules.mysql.MySQLIndex 的详细信息:
Component Details
Name : com.barchart.news.modules.mysql.MySQLIndex
State : UNSATISFIED
References
Reference : com.barchart.news.server.common.SharedExecutorService/*
State : satisfied
Multiple : single
Optional : mandatory
Policy : static
Service Reference : No Services bound
Reference : com.barchart.news.server.pipeline.PipelineService/*
State : satisfied
Multiple : single
Optional : mandatory
Policy : static
Service Reference : No Services bound
是什么阻止了 MySQLIndex 捆绑包被激活?