Community
Participate
Working Groups
As part of the effort to get better up to speed on the internals of eclipse and how jetty is in use, we want to work on updating the org.eclipse.equinox.http.jetty6 service to jetty7.
Created attachment 149819 [details] port of org.eclipse.equinox.http.jetty6 to jetty7 Here is a port of the equinox plugin that starts jetty inside eclipse-rcp. The original source is here: :pserver:anonymous@dev.eclipse.org:/cvsroot/rt org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6 Please note that implementation of the JettyCustomizer will also need to be ported to jetty7. There is no implementation of JettyCustomizer in eclipse-SDK. If we were to remove jetty6 and place jetty7 we would need to track the projects that use this interface and advise them to upgrade. The eclipse-SDK help server calls the static public APIs of this bundle. I have tested that it works with these changes. I have also tested that the HttpService still works. Please note that in fact this plugin does now contains the HttpService implementation. Equinox uses the bundle org.eclipse.equinox.http.servlet (found here: :pserver:anonymous@dev.eclipse.org:/cvsroot/rt org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.servlet) It defines the ProxyServlet. When the ProxyServlet is deployed on jetty (or any other servlet container really) in the root context and with the servlet mapping "/*" it will register an implementation of HttpService. The bundle org.eclipse.equinox.http.jetty* will deploy an instance of such ProxyServlet that provides in its turn the HttpService. I hope this helps.
A few comments on the patch: Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are specified for compatibility with 3.2 -Eclipse-LazyStart: true -Bundle-ActivationPolicy: lazy +Eclipse-LazyStart: false Why is it non-lazy? Having Eclipse-LazyStart: false is unnecessary, since it's the default. But we should change the Comment-Header if needed. * the Jetty connector; in case of Jetty 6 the context is of - * type <code>org.mortbay.jetty.Connector</code> + * type <code>org.eclipse.jetty.server.Connector</code> The first line needs to be updated to Jetty 7 as well. The bundle is located at: org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6 Should it not be put in a new bundle (rather than patched) to: org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty7? That way, both could be provided/tested.
(In reply to comment #1) > Please note that implementation of the JettyCustomizer will also need to be > ported to jetty7. This is an extension interface which allows to customize Jetty instances created by the Equinox Jetty HttpService bundle. It is meant to be very specific to the Jetty versions so it can be assumed that clients/implementors are expected to deal with API changes depending on different Jetty versions.
(In reply to comment #2) Hi Alex, sorry somehow I did not trail the activiaty on this bug. Thanks for the in-depth review. > A few comments on the patch: > > Comment-Header: Both Eclipse-LazyStart and Bundle-ActivationPolicy are > specified for compatibility with 3.2 > -Eclipse-LazyStart: true > -Bundle-ActivationPolicy: lazy > +Eclipse-LazyStart: false > > Why is it non-lazy? Having Eclipse-LazyStart: false is unnecessary, since it's > the default. But we should change the Comment-Header if needed. I agree in the context of this bug it is a mistake to not make it lazily activated. I believe I got confused because I wanted this jetty management to take a second position and give a chance to jety-osgi to manage the jetty instances instead. I kind of wanted to make this look suspicious so we could work on this later on. We should definitely keep Bundle-ActivationPolicy: lazy in the context of this patch. > > * the Jetty connector; in case of Jetty 6 the context is of > - * type <code>org.mortbay.jetty.Connector</code> > + * type <code>org.eclipse.jetty.server.Connector</code> > > The first line needs to be updated to Jetty 7 as well. > > The bundle is located at: > > org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty6 > > Should it not be put in a new bundle (rather than patched) to: > > org.eclipse.equinox/compendium/bundles/org.eclipse.equinox.http.jetty7? That > way, both could be provided/tested. I agree, that is the way I developped it on github: http://github.com/hmalphettes/eclipse.equinox.http.jetty7 Thanks, this helps a lot.
Created attachment 165154 [details] jetty6 to jetty7: patch done from scratch We are working on this bug for Equinox here: 309529 I have redone the migration from scratch and from a fresh checkout of the equinox cvs. I have followed the suggestion of everyone and named the project org.eclipse.equinox.jetty7
Assigning to Hugues.
ok...over a year now Where are we at with this issue now? Can we close it?
Equinox adopted jetty8 based on the work done here. The jetty8 work took place in bug 309529