Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.ConversationContext


            if (timeout != 0L)
            {
                if ((System.currentTimeMillis() - conv.getActiveTime()) > timeout)
                {
                    ConversationContext ctx = getConversationContext(conv);
                    if (ctx != null)
                    {
                        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

                    //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

    {
        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

                    //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)
                    {
                        ctx.destroy();
                    }
                    it.remove();
                }
            }
        }
View Full Code Here

                manager.addConversationContext(this, (ConversationContext) BeanManagerImpl.getManager().getContext(ConversationScoped.class));
               
            }catch(Exception e)
            {
                //TCK tests
                manager.addConversationContext(this, new ConversationContext());
            }           
        }
        //Already started conversation.
        else
        {
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.