HttpService and ServiceTracker [message #1731742] |
Mon, 09 May 2016 17:53 |
|
I don't register the servlet in web.xml as I want the OSGi part to take care of that.
In start(BundleContext) I register a ServiceTracker for HttpService and expect the "addingService" from my ServiceTrackerCustomizer to be called but it isn't happening.
I am using virgo-tomcat-server-3.6.4.RELEASE and things like /admin are working correctly.
Do I have to explicitly start the org.osgi.service.http.HttpService somewhere?
|
|
|
Re: HttpService and ServiceTracker [message #1731757 is a reply to message #1731742] |
Mon, 09 May 2016 23:03 |
|
I found this 5 year old blog post by Christopher Frost: http://chrisfrost.com/eclipse-rt/extending-virgo-with-a-httpservice/
(Is this still the way to do it?)
In his blog he states:
Quote:Several people have asked about us providing a packaging of Virgo that includes the OSGi HttpService. We don't have any plans to do so because it's so easy to extend Virgo with extra function yourself.
Surely as an OSGi based server, providing OSGi Services, it would be normal to assume that an enterprise class OSGi server, that already has tomcat or jetty, would automatically provide the OSGi specified "HttpService" too ( to clarify, I'm not asking about the integration in the Virgo kernel, but it the tomcat and jetty variants).
If it is, as Christopher put it "it's so easy to extend Virgo with extra function yourself", then why not have this "easy" part in every Virgo Enterprise Web server?
|
|
|
|
Re: HttpService and ServiceTracker [message #1732016 is a reply to message #1731781] |
Wed, 11 May 2016 19:00 |
|
Hi GianMaria,
I'm going to have to combine both solutions due to the peculiarities of the implementation.
I checked out the link you provided and it appears that the information there is based on a package that no longer exists and the "jetty" alternative relies on mortbay jetty 5.1.11 (now up to eclipse jetty 9.x).
I shall have to try out a combination of the the latest o.e.equinox.http.* and o.e.jetty bundles to see what I can get working.
This promises to be an interesting challenge, as the final implementation will have both a jetty and tomcat server implementations running.
|
|
|
Powered by
FUDForum. Page generated in 0.03989 seconds