>>>>> On Wed, 5 Nov 2014 16:27:00 +0100, arjan tijms <arjan.tijms_at_gmail.com> said:
AT> The CDI 1.2 spec specifies producers for HttpServletRequest,
AT> HttpSesison, and the ServletContext.
AT> Considering all artefacts in Java EE that would make sense to be
AT> injected, it seems a bit arbitrary that CDI itself contains producers
AT> for these Servlet types.
AT> Wouldn't it be better (cleaner) to have those producers in the Servlet
AT> spec instead?
I admit we have work to do in ensuring consistency on matters of CDI
producers and technologies that depend on those producers. This thread
cites one such case, in the Servlet spec. I suspect there are others,
such as in JSF.
My general principle in these matters are to keep such things as close
to the "using spec" as possible. These matters need to be evaluated on
a case-by-case basis. Arjan, thanks for bringing this up. Can you
please cite the specific text in the CDI 1.2 spec so we can discuss it?
Thanks,
Ed
--
| edward.burns_at_oracle.com | office: +1 407 458 0017
| 2 work days til Devoxx 2014