首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在karaf中安装scr功能后,将调用activate方法两次

在karaf中安装scr功能后,将调用activate方法两次
EN

Stack Overflow用户
提问于 2015-11-08 23:04:14
回答 1查看 563关注 0票数 0

我正在尝试使用apache-karaf 2.3.10安装一个OSGi包,其中包含我已经在此link中发布的示例。我执行了以下步骤

代码语言:javascript
复制
1. Downloaded apache-karaf version 2.3.10 
2. Executed the command features:install scr. Successfully installed scr. I have verified by executing scr:list
3. Installed all the bundles
4. Finally after starting all the bundles activate method in ExampleComponentFactoryManager  called twice and two objects are created. I have verified the same by executing the command scr:list
5. After uninstalling the scr feature the activate method in ExampleComponentFactoryManager called only once which is the expected behaviour.
6. Also i have noted that upto apache-karaf-2.3.10 while installing the scr feature it fetches from the online repo. But from 2.3.11 i am getting error because it tries to fetch it from my maven repository. The error is shown the console.

谁能告诉我karaf中的功能scr发生了什么?因为有了scr特性,我可以看到karaf中有哪些可用工厂和实例。这是预期的吗?

EN

回答 1

Stack Overflow用户

发布于 2015-11-08 23:21:16

您是否可以检查是否有两个felix scr包实例正在运行。这就解释了双重对象的创建。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33595375

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档