Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.ConversationContext


    private void cleanupConversation() {
        if (webBeansContext.getService(ConversationService.class) == null) {
            return;
        }

        final ConversationContext conversationContext = getConversationContext();
        if (conversationContext == null) {
            return;
        }

        final ConversationManager conversationManager = webBeansContext.getConversationManager();
View Full Code Here


            return;
        }

        if (context == null) {
            if (conversationContext.get() == null) {
                ConversationContext newContext = new ConversationContext();
                newContext.setActive(true);

                conversationContext.set(newContext);
            } else {
                conversationContext.get().setActive(true);
            }
View Full Code Here

    private void destroyConversationContext() {
        if (webBeansContext.getService(ConversationService.class) == null) {
            return;
        }

        ConversationContext context = getConversationContext();

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

        if (null != conversationContext) {
            conversationContext.set(null);
            conversationContext.remove();
View Full Code Here

                    //Throw Busy exception
                    throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation");
                }
                else
                {
                    ConversationContext conversationContext = conversationManager.getConversationContext(conversation);
                    contextFactory.initConversationContext(conversationContext);
                }
            }
        }
    }
View Full Code Here

                    //Throw Busy exception
                    throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation");
                }
                else
                {
                    ConversationContext conversationContext = conversationManager.getConversationContext(conversation);
                    contextFactory.initConversationContext(conversationContext);
                }
            }
        }
    }
View Full Code Here

                    //Throw Busy exception
                    throw new BusyConversationException("Propogated conversation with cid=" + cid + " is used by other request. It creates a new transient conversation");
                }
                else
                {
                    ConversationContext conversationContext = conversationManager.getConversationContext(conversation);
                    contextFactory.initConversationContext(conversationContext);
                }
            }
        }
    }
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.isLoggable(Level.INFO))
                        {
                            logger.log(Level.INFO, OWBLogConst.INFO_0011, conv.getId());
                        }
                        ctx.destroy();
                    }

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

    private void cleanupConversation() {
        if (webBeansContext.getService(ConversationService.class) == null) {
            return;
        }

        final ConversationContext conversationContext = getConversationContext();
        if (conversationContext == null) {
            return;
        }

        final ConversationManager conversationManager = webBeansContext.getConversationManager();
View Full Code Here

            return;
        }

        if (context == null) {
            if (conversationContext.get() == null) {
                ConversationContext newContext = new ConversationContext();
                newContext.setActive(true);

                conversationContext.set(newContext);
            } else {
                conversationContext.get().setActive(true);
            }
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.