setting startlevel for OSGI bundle

让人想犯罪 __ 提交于 2019-12-11 10:47:20

问题


(I use glassfish 3.1, felix)

I have a log bundle that needs to be started before other bundles in my glassfish server.

Is there a way to configure startlevel for a single OSGI bundle? Any of the following ways will be fine: configuring a properties file, solution on java side, header in bundle manifest.

thanks.


回答1:


In Felix, you can change the launcher properties (for instance, conf/config.properties) to start bundles with different start levels. You can use the felix.auto.deploy.install.<n> properties for that.

To set the framework's initial startlevel, you can use the configuration property org.osgi.framework.startlevel.beginning, see section 4.2.2 of the core spec for more information.



来源:https://stackoverflow.com/questions/6611387/setting-startlevel-for-osgi-bundle

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