Skip to main content

Adam Bien: Does CDI Injection Of SessionScoped Beans Into A Servlet Work?

Adam Bien answers Does CDI Injection Of SessionScoped Beans Into A Servlet Work?:

CDI managed beans are injectable intro Servlets. But: are SessionScoped instances correctly associated with requests belonging to a given session? The following servlet injects a @SessionScoped SessionStore managed bean and stores the recent URI as payload. The content of the HTTP header, as well as...

Community: