Hi,
I am currently working on a tutorial about OSGi Remote Services. I am using ECF and setting up different environments.
With PDE tooling I can consume Jetty 10 and Equinox HttpService and HttpWhiteboard and configure the auto-start of org.eclipse.equinox.http.jetty to get everything up and running.
With Bndtools I started using org.apache.felix.http.jetty which combines Jetty 9 and the HttpService and HttpWhiteboard. Works fine, but there is a strange issue if an ECF configuration is missing, which I did not see in the PDE example.
As there is no Apache Felix Jetty 10, I created a setup with all the bundles separately. But I don’t get the bundles org.eclipse.equinox.http.jetty and org.eclipse.equinox.http.servlet to start. I suppose because of two reasons:
- The bundles are configured for lazy activation
- Since Equinox has the policy to separate the service interfaces and the service implementations, nobody ever requests a class from the Equinox Http bundles.
My first question would be, am I right with my assumption?
Second, if my understanding is correct, what could be done to fix this?
If my understanding is incorrect, what could I do to get the bundles started?
Currently I have implemented an immediate component that searches for bundles that contain equinox.http.jetty that are in STARTING state and start them programmatically. But I needed to place that in a DS project, as the application project is also not started and sticks in the RESOLVED state, even with the contained immediate component (probably also a misunderstanding of the application project and why it is not started automatically).
The sources are located here:
I am still working on the Maven archetype variant. But there I will probably face the same issue if I want to use Jetty 10 instead of the Felix re-bundled Jetty 9.
Greez,
Dirk