[cdi-dev] [JBoss JIRA] (CDI-492) Give ownership of servlet specific part to servlet specification

arjan tijms (JIRA) issues at jboss.org
Sat Jun 2 06:07:00 EDT 2018


    [ https://issues.jboss.org/browse/CDI-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13585866#comment-13585866 ] 

arjan tijms commented on CDI-492:
---------------------------------

Coming back to this and reading this again, I'm not sure why everyone understands Greg's concerns. His concerns mostly seem to be about things that are not being asked:

>More over,
>GW> I'm concerned that by making CDI to servlet mapping a responsibility
>GW> of the servlet container

Greg seems to be concerned he has to initialise CD implementations, but that's not what's being asked here.

> then we are going to have to do a
>GW> container to CDI adaptation for every CDI implementation out there.

This is just not the case here. It's a complete non-concern. What's being asked is a built-in bean/producer for the HttpServletRequest and other types, which can be done by a portable extension.

>GW> The servlet specification already provides servlet container initializers,
GW> which have all the power required for CDI implementations to implement
GW> these CDI v Servlet cross concerns. 

This clearly shows the mismatch of what Greg seems to think is being asked and what's actually being asked. A Servlet container initialiser of course has nothing to do with a built-in bean/producer for a certain type.


> Give ownership of servlet specific part to servlet specification
> ----------------------------------------------------------------
>
>                 Key: CDI-492
>                 URL: https://issues.jboss.org/browse/CDI-492
>             Project: CDI Specification Issues
>          Issue Type: Feature Request
>          Components: Java EE integration
>            Reporter: Antoine Sabot-Durand
>             Fix For: 2.1 (Discussion)
>
>
> [Section 3.8 of the spec|http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#additional_builtin_beans] places some requirements on CDI implementations when running with Servlet. To better suit user desires for modularity these requirements are better met by moving them to the Servlet spec. Specifically,
> {quote}
> A servlet container must provide the following built-in beans, all of which have qualifier @Default:
> * a bean with bean type {{javax.servlet.http.HttpServletRequest}}, allowing injection of a reference to the HttpServletRequest
> * a bean with bean type {{javax.servlet.http.HttpSession}}, allowing injection of a reference to the HttpSession,
> * a bean with bean type {{javax.servlet.ServletContext}}, allowing injection of a reference to the ServletContext,
> These beans are passivation capable dependencies, as defined in Passivation capable dependencies.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the cdi-dev mailing list