Startup for bundles placed in the deploy folder of Karaf

岁酱吖の 提交于 2019-12-11 10:40:19

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/31160318/startup-for-bundles-placed-in-the-deploy-folder-of-karaf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!