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 Wed, 16 Dec 2020 at 14:01, Stuart Douglas <sdouglas@xxxxxxxxxx> wrote:
Well IMHO it's more important to allow creation of 'normal' discovered Servlets to be pluggable. ServletContext.createXxx does not really matter because you can just use CDI.current().instance(Foo.class) instead, if you really want to create a CDI ready instance. I don't see the createXx methods as being particulally important, I think the main idea is that you can bundle CDI into a Servlet container and it can take control of the Servlet/Filter/Lister creation process.

I see the 'normal' discovered Servlets and those obtained from the create methods as the same thing.  In fact internally Jetty uses the create methods to instantiate `normal` discovered Servlets, so that when we plug in CDI integration to our DecoratedObjectFactory abstraction that is behind the create method, then we get CDI for all servlets instantiated by the container regardless of how.     I think it is important to avoid creating different behaviours for different places that servlets etc. can be instantiated.

cheers

 

--

Back to the top