启动放置在Karaf的deploy文件夹中的包 [英] Startup for bundles placed in the deploy folder of Karaf

查看:75
本文介绍了启动放置在Karaf的deploy文件夹中的包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个捆绑软件-捆绑软件A出口bnd.a. *软件包和捆绑软件B进口bnd.a. *;我将这些捆绑软件保存在deploy文件夹中;它可以工作,但有时捆绑B首先出现在捆绑A之前,但失败了!有没有办法设置保存在deploy文件夹中的分发包的启动顺序?

I have two bundles - bundle-A exports bnd.a.* packages and bundle-B imports bnd.a.*; I keep these bundles in the deploy folder; it works but there are times when bundle-B comes first before bundle-A and fails! Is there a way to set the start up order for bundles kept in the deploy folder?

请注意,我们使用功能的开始级别使其正常运行,但在部署文件夹中却不正确.

Please note that we got it working using feature's start level but not right in the deploy folder.

推荐答案

否, 因为deploy文件夹只是在开发期间部署捆绑软件的另一种方法.对于生产来说,最好总是使用特征描述符.在开发时使用Karaf的另一种方法是,使用karaf shell中的bundle:watch命令,它将更新捆绑包,以防重新编译.

No, as the deploy folder is just another way of deploying bundles during development time. For Production it's always best to use feature descriptors. Another way of using Karaf in development time, use the bundle:watch command from the karaf shell it'll update a bundle in case it did get re-compiled.

另一个提示,您永远不要依赖起始级别,而应尝试确保第二个捆绑软件导入仅在第一个捆绑软件可用时才可用的服务.这将确保您的应用程序具有更高的故障安全性.

Another hint, you should never rely on the start level, instead try to make sure your second bundle imports a service only available when the first bundle is available. This will make sure your application is much more failsafe.

这篇关于启动放置在Karaf的deploy文件夹中的包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆