please see inline.
On 04/12/14 10:30, arjan tijms wrote:
In my eyes, it is
something which was forgotten to do in Java EE 7 release,
since HttpUpgradeHandler was introduced in it.
Also please note, that other Servlet related scopes are
already in CDI spec, so it seems like it belongs there more
than anywhere else.
But some of these may not actually belong there. They may
have been put there originally since as a new spec that had yet
to be proven, CDI could not right away ask other specs to
support it.
There are discussions going on to move some of the Servlet
things from CDI to Servlet.
This might have multiple
reasons - for example, you can easily define relationship
between @UpgradeScoped and others, already existing ones. In
this sense, CDI specification now depends on Servlet API (it
references some of the classes defined in it), but Servlet
does not do that for CDI. I don't think that Servlet spec
should introduce similar dependency just because of new scope.
There are plenty of other reasons too ;) For Servlet I expect
the dependencies to be optional. Servlet in a EE environment
will then provide scope X & Y, and producers for types Q
& R, but it will continue to run standalone without needing
any CDI. In short, it would provides things for CDI then but in
its core wouldn't need CDI.
Just my 2 cents ;)
Thanks! :-)