One more thing, given the http whiteboard, you don't need to manually construct servlet contexts, those are created for you as a result of registering a ServletContextHelper service with appropriate properties. Assembling applications around a single central servletcontext is both simple and dynamic.
It's already very service oriented. I'd recommend reviewing the http whiteboard spec to really grasp how it works. Sincerely, - Ray On Oct 28, 2016 2:53 PM, "Raymond Auge" <[email protected]> wrote: > It's not really possible to do that in http whiteboard AND support both > embedded and bridge modes of operation. > > However you can rest assured that this implementation is handling it > pretty well in both modes on production servers that handle commercial > loads. > > It may not be completely perfect, and I'm sure there are some bugs, but > it's far from a toy :) > > Furthermore, for each sub-context, there's a distinct instance of a > servletcontext created by this little container. All those contexts will be > at paths below that of the "root" servlet context. > > Sincerely, > - Ray > > On Oct 28, 2016 10:54 AM, "Todor Boev" <[email protected]> wrote: > >> Thanks for the detailed reply. >> >> Looking at HttpServiceServlet I can't help, but notice that the entire >> whiteboard seems to be anchored in a single ServletContext. Therefore it >> must multiplex access to this context to simulate multiple whiteboard web >> applications. This does not seem like a very easy/stable design to >> implement. >> >> Would it be possible to introduce a service oriented solution along the >> lines of the Gemini Web web container adapter: >> http://git.eclipse.org/c/gemini.web/org.eclipse.gemini.web. >> gemini-web-container.git/tree/org.eclipse.gemini.web.core/ >> src/main/java/org/eclipse/gemini/web/core/spi/ServletContainer.java >> >> Implementations of this adapter have to be able to programatically talk >> to a concrete web container instance to make it create ServletContexts. >> From my experience with Tomcat it is not very hard to make a ServletContext >> (i.e. a web app internal structure) entirely programatically without any >> web.xml etc. metadata. It is also pretty easy to boot Tomcat from a bundle. >> I imagine it will be even easier on Jetty. Combine this with the >> programmatic servlet/filter/listener creation in Servlet 3.0 and it seems >> like a compelling design. Basically the whiteboard will only have to bridge >> Servlet 3.0 with the OSGi service registry. >> >> Does such a (radical) redesign seem feasible? >> >> Regards >> >> On Fri, Oct 28, 2016 at 3:12 AM, Raymond Auge <[email protected]> >> wrote: >> >>> The bundle you need is: >>> >>> http://download.eclipse.org/eclipse/updates/4.6/R-4.6-201606 >>> 061100/plugins/org.eclipse.equinox.http.servlet_1.3.0.v20160517-1559.jar >>> >>> I you are using PDE projects then you can just use this repository as >>> normal. >>> >>> IF you are using bndtools >=3.3 you can use this repository >>> configuration: >>> >>> -plugin.Eclipse.Neon: \ >>> aQute.bnd.repository.p2.provider.P2Repository; \ >>> name = "Eclipse 4.6 (Neon)"; \ >>> url = "http://download.eclipse.org/e >>> clipse/updates/4.6/R-4.6-201606061100/" >>> >>> In order to use this bundle with your own servlet container you must >>> create a bundle which will create an instance of >>> >>> org.eclipse.equinox.http.servlet.HttpServiceServlet >>> >>> That instance must provide access to a ServletContext of the real >>> servlet container, and from there the implementation will take over >>> handling sub servlet context's for you. >>> >>> Here's a real world implementation of this: >>> >>> https://github.com/liferay/liferay-portal/blob/master/module >>> s/apps/static/portal-osgi-web/portal-osgi-web-wab-extender/s >>> rc/main/java/com/liferay/portal/osgi/web/wab/extender/intern >>> al/adapter/HttpAdapter.java >>> >>> Furthermore, I really dislike how this is implemented, It's a pretty >>> terrible API design. It would be great to make this service oriented. I'll >>> certainly appreciate any contributions to make it better. >>> >>> - Ray >>> >>> >>> On Wed, Oct 26, 2016 at 2:46 PM, Todor Boev <[email protected]> wrote: >>> >>>> Hello, >>>> >>>> I am looking for an implementation of the Http Whiteboard OSGi standard >>>> (Chapter 140 EEG spec). >>>> I also need to run it over Tomcat 8. >>>> Finally it is preferable that the whiteboard runs in "native mode" >>>> rather than via a bridge servlet. I.e. have Tomcat instantiate an actual >>>> ServletContext for every web app root as it does with WAR/WABs. >>>> >>>> Equinox supposedly has an Http whiteboard R6 implementation, but I am >>>> somewhat confused as to which bundles do I need to run to get it. >>>> >>>> Regards >>>> Todor >>>> >>>> _______________________________________________ >>>> equinox-dev mailing list >>>> [email protected] >>>> To change your delivery options, retrieve your password, or unsubscribe >>>> from this list, visit >>>> https://dev.eclipse.org/mailman/listinfo/equinox-dev >>>> >>> >>> >>> >>> -- >>> *Raymond Augé* <http://www.liferay.com/web/raymond.auge/profile> >>> (@rotty3000) >>> Senior Software Architect *Liferay, Inc.* <http://www.liferay.com> >>> (@Liferay) >>> Board Member & EEG Co-Chair, OSGi Alliance <http://osgi.org> >>> (@OSGiAlliance) >>> >>> _______________________________________________ >>> equinox-dev mailing list >>> [email protected] >>> To change your delivery options, retrieve your password, or unsubscribe >>> from this list, visit >>> https://dev.eclipse.org/mailman/listinfo/equinox-dev >>> >> >> >> _______________________________________________ >> equinox-dev mailing list >> [email protected] >> To change your delivery options, retrieve your password, or unsubscribe >> from this list, visit >> https://dev.eclipse.org/mailman/listinfo/equinox-dev >> >
_______________________________________________ equinox-dev mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/equinox-dev
