Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Big ticket items for Servlet 6 / Jakarta EE 10?



On Tue, 15 Dec 2020 at 18:57, arjan tijms <arjan.tijms@xxxxxxxxx> wrote:

Integrating web frameworks into servlets has been and will be a mistake. 

I'm not really sure which web framework would have to be integrated in servlets. There are only two in scope from the Jakarta perspective: Jakarta Faces and Jakarta MVC and neither have that need AFAIK.

From my point of view, a CDI that creates components dynamically to handle specific servlet requests is a web framework.  

When we start adding functionality to support a specific way/style to handle requests by dynamically routing them to beans, then we start integrating a specific framework responsibility into servlets.   We should support frameworks, but only generically, so when there is a new style for handling individual requests we don't have a whole CDI request scope legacy baked into the servlet container.

So I'm fully supportive of making it so that CDI can be used to create the components that Servlet needs anyway within the life cycles that the Servlet spec defines.  But I'm not supportive of making Servlets support the fine grained features that CDI needs for dynamic routing of requests to beans.

More specifically, container managed Servlets are not dynamic, they can be created during initialization but not afterwards.  CDI should be able to be used to assist with that initial creation, but if CDI wants more fine grained lifecycles for request or session, then that needs to be done within a proxy Servlet and not by dynamic registration of servlets on the container.

--

Back to the top