I have to migrate an application to Karaf 4. This application has it's own service infrastructure (full qualified names of the implementation classes are defined in text file in META-INF/myServices.txt).
The modules of application have uses an handmade lookup mechanism to find instances of the services. In Karaf 3 we implemented a bundle activator that reads a bundle start the services from the META-INF/myServices.txt and registers the services instances in the handmade lookup. It worked fine in Karaf 3. When migrating to Karaf 4 this mechanism is no longer working. It seems that the start order of the bundles has been improved. The following scenario is no longer working: interface of service S1 is defined in bundle B1 implementation of services S1 is in bundle B2 Bundle B3 uses service S1. Bundle B3 does not use directly use a package of bundle B2. It happens Karaf 4 that bundle B3 starts before bundle B2. One possibility would be to register all "handmade" services as OSGI services and the hand made lookup looks also for OSGI services. However I am afraid that we get unwanted side effects because up to now the handmade service infrastructure and the OSGI service very strictly divided. Is it possible to solve the problem with Require-/Provide Capabilities Header in the OSGI manifiest? Is it in Karaf 4 possible to define a custom management agent that influences the start level of OSGI bundles? Richard
