How to auto-start/eager start OSGi services on Eclipse platform

前端 未结 5 1636
别跟我提以往
别跟我提以往 2021-01-11 22:44

I develop an Eclipse RCP application which makes heavy use of OSGi bundles which provide services for later use. The use case requires the bundles to register their services

5条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-11 23:24

    MANIFEST.MF has this:

    Bundle-ActivationPolicy: lazy
    

    This could be also useful:

    http://wiki.eclipse.org/Lazy_Start_Bundles#Should_I_change_to_the_new_Bundle-ActivationPolicy_Header.3F

    However I would say I would try relying on OSGI activation as much as possible. If there is no other way of solving your problem, then the previous link might help.

提交回复
热议问题