[jsr369-experts] [116-CDIRelatedBeansInServletSpec] PROPOSAL

From: Edward Burns <edward.burns_at_oracle.com>
Date: Wed, 19 Nov 2014 10:09:51 -0800

Hello Volunteers,

The Servlet spec PDF currently only mentions CDI on two pages (and one
of them is a reference to the other). It appears the normative
declaration of the requirements in Servlet regarding CDI is in our
section 15.5.15 "Contexts and Dependency Injection for Java EE

The CDI spec is trying to trim itself down and part of that effort
requires fobbing off some requirements previously declared in the CDI
spec itself to other related specs. In this case, we have the

CDI Spec section 3.8 [1] 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,

CDI3.8> A servlet container must provide the following built-in
CDI3.8> beans, all of which have qualifier @Default:

CDI3.8> a bean with bean type javax.servlet.http.HttpServletRequest,
CDI3.8> allowing injection of a reference to the HttpServletRequest

CDI3.8> a bean with bean type javax.servlet.http.HttpSession,
CDI3.8> allowing injection of a reference to the HttpSession,

CDI3.8> a bean with bean type javax.servlet.ServletContext, allowing
CDI3.8> injection of a reference to the ServletContext,

CDI3.8> These beans are passivation capable dependencies, as defined
CDI3.8> in Passivation capable dependencies.

To put these items in the Servlet spec, we may have to couch them in
terms similar to, "when running in an environment that also supports


Include language in our spec section 15.5.15 which allows the CDI spec
to remove their language while preserving desired existing user

What do you all think? I know several of our constituents do not count
CDI support among their user requirements. Is this going to be a


[1] http://docs.jboss.org/cdi/spec/1.2/cdi-spec.html#additional_builtin_beans

| edward.burns_at_oracle.com | office: +1 407 458 0017