eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
690 stars 353 forks source link

osgi-http-service example doesn't register servlets #4066

Open dhubbard-ag opened 5 years ago

dhubbard-ag commented 5 years ago

hi

I have deployed the osgi-http-servlet example into Glassfish 5 (paraya-5.184)

The bundle starts - I get "STARTING HTTP SERVICE BUNDLE"

At this point I was expecting the Servlets to get registered and the "/status" jersey resource to be available - presumably (from the code) via "/jersey-http-service/status".

However - the servlets never get registered. From looking at the code the registration appears to depend on adding a service to the tracker (ServiceTracker.addingService) but this is never called.

Am I missing something? Is there something extra that StatusResource needs to do to call the private ServiceTracker in Activator to trigger this?

Alternatively how would I create an instance of HttpService to allow registerServlet to be called directly?

jansupol commented 5 years ago

Can you point to an example you tried to deploy? Is it this one?

dhubbard-ag commented 5 years ago

@jansupol - apologies I though I had put a link in the question.

Originally on this issue it was jersey osgi-http. When I couldn't get that working - with a bit more digging I started trying the fighterfish one as per your link (and the referenced issue above)