Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.ConversationContext


    /**
     * Destroy conversation context.
     */
    private void destroyConversationContext()
    {
        ConversationContext context = getConversationContext();

        if (context != null)
        {
            context.destroy();
        }

        conversationContexts.set(null);
        conversationContexts.remove();
    }
View Full Code Here


        while (it.hasNext())
        {
            conv = (ConversationImpl) it.next();
            if (conv.getSessionId().equals(sessionId))
            {
                ConversationContext ctx = getConversationContext(conv);
                if (ctx != null)
                {
                    ctx.destroy();
                }
                it.remove();
            }
        }
    }
View Full Code Here

            if (timeout != 0L)
            {
                if ((System.currentTimeMillis() - conv.getActiveTime()) > timeout)
                {
                    ConversationContext ctx = getConversationContext(conv);
                    if (ctx != null)
                    {
                        if(logger.wblWillLogInfo())
                        {
                            logger.info(logger.getTokenString(OWBLogConst.INFO_0011),conv.getId());
                        }
                        ctx.destroy();
                    }

                    it.remove();
                }
            }
View Full Code Here

               
            }
            catch(Exception e)
            {
                //TCK tests
                manager.addConversationContext(this, new ConversationContext());
            }           
        }
        //Already started conversation.
        else
        {
View Full Code Here

            }
        }

        else if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
        {
            ConversationContext context = (ConversationContext) BeanManagerImpl.getManager().getContext(ConversationScoped.class);

            // if long running, saves it
            if (conversation.isLongRunning())
            {
                logger.info("Conversation with id : " + conversation.getId() + " is marked as long running conversation");
               
                context.setActive(false);
               
            }

            // else destroy conversation context
            else
View Full Code Here

            }           
        }

        else if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
        {
            ConversationContext context = (ConversationContext) BeanManagerImpl.getManager().getContext(ConversationScoped.class);

            if (!JSFUtil.isPostBack())
            {
                logger.info("Activating the conversation context for view id : " + JSFUtil.getViewId());
                context.setActive(true);

                conversation.updateTimeOut();
            }

            if (conversation.isLongRunning())
View Full Code Here

        conversationContext.remove();
    }

    private void cleanupConversations()
    {
        ConversationContext conversationContext = getConversationContext();

        if (conversationContext == null)
        {
            return;
        }
View Full Code Here

    {
        if (context == null)
        {
            if(conversationContext.get() == null)
            {
                ConversationContext newContext = new ConversationContext();
                newContext.setActive(true);
               
                conversationContext.set(newContext);               
            }
            else
            {
View Full Code Here

    /**
     * Destroy conversation context.
     */
    private void destroyConversationContext()
    {
        ConversationContext context = getConversationContext();

        if (context != null)
        {
            context.destroy();
        }

        conversationContext.set(null);
        conversationContext.remove();
    }
View Full Code Here

            if (timeout != 0L)
            {
                if ((System.currentTimeMillis() - conv.getActiveTime()) > timeout)
                {
                    ConversationContext ctx = getConversationContext(conv);
                    if (ctx != null)
                    {
                        if(logger.wblWillLogInfo())
                        {
                            logger.info(logger.getTokenString(OWBLogConst.INFO_0011),conv.getId());
                        }
                        ctx.destroy();
                    }

                    it.remove();
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.context.ConversationContext

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.