Package org.gatein.cdi.contexts.beanstore

Examples of org.gatein.cdi.contexts.beanstore.SessionBeanStore


    public void transition(final HttpServletRequest request, final String windowId, final PortletRequestLifecycle.State state) {
        if (getBeanStore() == null) {
            if (state.isPhase(RESOURCE_PHASE)) {
                setBeanStore(new ResourceTempBeanStore(request));
            } else {
                setBeanStore(new SessionBeanStore(request));
            }
        }

        String attributeName = prefix(windowId);
        if (state.isPhase(RESOURCE_PHASE)) {
            attributeName = Thread.currentThread().getId() + attributeName;
        }

        SessionBeanStore store = (SessionBeanStore) getBeanStore();
        HttpSession session = store.getSession(true);

        PortletRequestLifecycle lifecycle = getLifecycle(windowId);
        if (lifecycle == null) {
            lifecycle = (PortletRequestLifecycle) session.getAttribute(attributeName);
View Full Code Here


        setCurrentLifecycle(windowId, lifecycle);
    }

    @Override
    public void dissociate(final HttpSession session) {
        setBeanStore(new SessionBeanStore(session));
        destroy();
        Enumeration<String> names = session.getAttributeNames();
        while (names.hasMoreElements()) {
            String name = names.nextElement();
            if (name.startsWith(TRANSITION_PREFIX)) {
View Full Code Here

TOP

Related Classes of org.gatein.cdi.contexts.beanstore.SessionBeanStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.