Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.context;
 import java.util.Map;
 import  javax.servlet.http.HttpSession;

The built in session context is associated with SessionScoped. It can be activated, invalidated and deactivated.

Weld comes with two implementation of the session context. The HttpSessionContext, in which conversations are bound to the HttpSession, can be injected:

 @ Inject @ Http SessionContext sessionContext;

Alternatively the BoundSessionContext in which conversations are bound a Map can be injected:

 @ Inject @ Bound SessionContext sessionContext;

Pete Muir
See also:
public interface SessionContext extends ManagedContext {
New to GrepCode? Check out our FAQ X