Package org.apache.myfaces.orchestra.conversation

Examples of org.apache.myfaces.orchestra.conversation.ConversationManager


                // Hmm..actually, we should make sure the wiper thread never cleans up anything
                // associated with a session that is currently in use by a request. That should
                // then be sufficient, as the timeouts will only apply after the end of the
                // request that caused this activation to occur by which time any relevant
                // timestamps have been restored.
                ConversationManager cm = (ConversationManager) val;
                conversationWiperThread.addConversationManager(cm);
            }
        }
    }
View Full Code Here


        {
            String attrName = (String) e.nextElement();
            Object val = session.getAttribute(attrName);
            if (val instanceof ConversationManager)
            {
                ConversationManager cm = (ConversationManager) val;
                conversationWiperThread.removeConversationManager(cm);
            }
        }
    }
View Full Code Here

            // Note that if the request being processed includes any code that uses FacesContext.responseWriter
            // then that invokes the ConversationRequestParameterProvider. And that always writes out a contextId
            // which in turn requires creating a ConversationManager. But there are value requests that run the
            //
            // Note that ConversationManager.getInstance requires the FrameworkAdapter to be initialized.
            ConversationManager manager = ConversationManager.getInstance(false);
            if (manager != null)
            {
                // Fetch a context for this request if one already exists, and lock it
                // so that concurrent requests that affect this context block until
                // this request is complete. Not doing so can cause races for resources
                // within the current context, such as beans or PersistenceContexts.
                //
                // But if the request did not explicitly specify a contextId then we
                // do NOT create a new context at this point. Doing so would create
                // contexts for things like Weblet resource requests, and that context
                // would then just hang around unused until it times out!
                //
                // Note that a request that does not explicitly specify a contextId
                // might have one created for it later in the request, eg when an
                // orchestra-scoped bean is accessed. However this is not a race
                // condition because nothing else can refer to that newly created
                // id until the response for this request has been sent back to the
                // client browser.
                context = manager.getCurrentRootConversationContext();
                if (context != null)
                {
                    try
                    {
                        if (log.isDebugEnabled())
View Full Code Here

TOP

Related Classes of org.apache.myfaces.orchestra.conversation.ConversationManager

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.