Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.context.http;
 
 
 import  javax.servlet.http.HttpServletRequest;
 import  javax.servlet.http.HttpSession;
 
public class HttpSessionContextImpl extends AbstractBoundContext<HttpServletRequest> implements HttpSessionContext {
    // There is no need to store FQCN in a session key
    static final String NAMING_SCHEME_PREFIX = "WELD_S";
    private final NamingScheme namingScheme;
    private final String contextId;
    public HttpSessionContextImpl(String contextIdBeanIdentifierIndex index) {
        super(contextIdtrue);
        this. = contextId;
    }
    public boolean associate(HttpServletRequest request) {
        // At this point the bean store should never be set - see also HttpContextLifecycle.nestedInvocationGuard
        if (getBeanStore() != null) {
            ..beanStoreLeakDuringAssociation(this.getClass().getName(), request);
        }
        // We always associate a new bean store to avoid possible leaks (security threats)
        setBeanStore(new LazySessionBeanStore(request));
        return true;
    }
    public boolean destroy(HttpSession session) {
        if (getBeanStore() == null) {
            try {
                HttpConversationContext conversationContext = getConversationContext();
                setBeanStore(new EagerSessionBeanStore(session));
                activate();
                invalidate();
                conversationContext.destroy(session);
                deactivate();
                setBeanStore(null);
                return true;
            } finally {
                cleanup();
            }
        } else {
            // We are in a request, invalidate it
            invalidate();
            getConversationContext().destroy(session);
            return false;
        }
    }
    public Class<? extends AnnotationgetScope() {
        return SessionScoped.class;
    }
        return Container.instance().deploymentManager().instance().select(HttpConversationContext.class).get();
    }
    protected Conversation getConversation() {
        return Container.instance().deploymentManager().instance().select(Conversation.class).get();
    }
New to GrepCode? Check out our FAQ X