[cdi-dev] New Servlet related scope - @UpgradeScoped (?)

Pavel Bucek pavel.bucek at oracle.com
Wed Dec 3 11:55:27 EST 2014


Hi all,

I'm trying to figure out how to solve issue in JSR 356 - Java API for 
WebSocket, related to CDI scope usable from WebSocket endpoints. Problem 
is, that "standard" scopes do not apply, because there is no 
@RequestScoped (http response is already sent), HttpSession does not 
need to be created and the rest does not seem to be applicable, ...

I believe that CDI specification should define @UpgradeScoped, which 
would cover usages of HttpUpgradeHandler from Servlet API. (Similarly as 
it does for @RequestScoped, @SessionScoped, ... )

What are your thoughts about this?

Thanks and regards,
Pavel



More information about the cdi-dev mailing list