Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [servlet-dev] Make Servlets CDI beans?

Hi Arjan,

Further to our discussion on the platform call, I don't think making Servlet CDI Bean has much usage as I have not got any use case to say that you need to inject Servlet to another class. Please specify your use case if you have any.

Based on the Jakarta EE platform spec, Servlet is a special Jakarta EE class and it supports the standard injection and interceptor. Your requirement for injection and interceptor support should be met though.
image.png
Thanks
Emily


On Tue, Nov 7, 2023 at 3:57 PM Arjan Tijms via servlet-dev <servlet-dev@xxxxxxxxxxx> wrote:
Hi,

This was discussed a while ago, but in the context of the CDI-centric Jakarta EE release it might be good to restart this discussion.

The overall goal of the Jakarta EE platform is to move the various spec specific component models and mechanisms to CDI (as per the "CDI-centric" theme).

Servlets have been @Inject injectable (loosely via the pruned Managed Beans spec, although the Servlet spec itself did not say so), but are themselves not CDI beans.

I'd like to propose to make Servlets officially CDI beans, but only within a Jakarta EE environment.

Meaning, Tomcat and Jetty would have no requirement to support this, and these requirements would be in a separate chapter of the Servlet spec.

Thoughts?

Kind regards,
Arjan Tijms
_______________________________________________
servlet-dev mailing list
servlet-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/servlet-dev


--
Thanks
Emily


Back to the top