Examples of ConversationService


Examples of org.apache.webbeans.spi.ConversationService

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        Conversation conversation = null;
        //Gets conversation service
        ConversationService conversationService = ServiceLoader.getService(ConversationService.class);       
        //Gets conversation id
        String conversationId = conversationService.getConversationId();      
        //Gets session id that conversation is created
        String sessionId = conversationService.getConversationSessionId();

        //If conversation id is not null, this means that
        //conversation is propogated
        if (conversationId != null)
        {
            //Gets propogated conversation
            conversation = ConversationManager.getInstance().getPropogatedConversation(conversationId,sessionId);
        }
       
        if (conversation == null)
        {
            if(sessionId != null)
            {
                conversation = new ConversationImpl(conversationService.getConversationSessionId());   
            }
            else
            {
                //Used in Tests
                conversation = new ConversationImpl();
View Full Code Here

Examples of org.apache.webbeans.spi.ConversationService

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        Conversation conversation = null;
        //Gets conversation service
        ConversationService conversationService = ServiceLoader.getService(ConversationService.class);       
        //Gets conversation id
        String conversationId = conversationService.getConversationId();      
        //Gets session id that conversation is created
        String sessionId = conversationService.getConversationSessionId();

        //If conversation id is not null, this means that
        //conversation is propogated
        if (conversationId != null)
        {
            //Gets propogated conversation
            conversation = ConversationManager.getInstance().getPropogatedConversation(conversationId,sessionId);
        }
       
        if (conversation == null)
        {
            if(sessionId != null)
            {
                conversation = new ConversationImpl(conversationService.getConversationSessionId());   
            }
            else
            {
                //Used in Tests
                conversation = new ConversationImpl();
View Full Code Here

Examples of org.apache.webbeans.spi.ConversationService

    private MyConversation conversationByName;

    @Before
    public void startConversation() {
        final WebBeansContext webBeansContext = WebBeansContext.currentInstance();
        webBeansContext.registerService(ConversationService.class, new ConversationService() {
            @Override
            public String getConversationId() {
                return "conversation-test";
            }
View Full Code Here

Examples of org.apache.webbeans.spi.ConversationService

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        Conversation conversation = null;
        //Gets conversation service
        ConversationService conversationService = ServiceLoader.getService(ConversationService.class);       
        //Gets conversation id
        String conversationId = conversationService.getConversationId();      
        //Gets session id that conversation is created
        String sessionId = conversationService.getConversationSessionId();

        //If conversation id is not null, this means that
        //conversation is propogated
        if (conversationId != null)
        {
            //Gets propogated conversation
            conversation = ConversationManager.getInstance().getPropogatedConversation(conversationId,sessionId);
        }
       
        if (conversation == null)
        {
            if(sessionId != null)
            {
                conversation = new ConversationImpl(conversationService.getConversationSessionId());   
            }
            else
            {
                //Used in Tests
                conversation = new ConversationImpl();
View Full Code Here

Examples of org.apache.webbeans.spi.ConversationService

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        Conversation conversation = null;
        //Gets conversation service
        ConversationService conversationService = getWebBeansContext().getService(ConversationService.class);
        //Gets conversation id
        String conversationId = conversationService.getConversationId();      
        //Gets session id that conversation is created
        String sessionId = conversationService.getConversationSessionId();

        //If conversation id is not null, this means that
        //conversation is propogated
        if (conversationId != null)
        {
            //Gets propogated conversation
            conversation = getWebBeansContext().getConversationManager().getPropogatedConversation(conversationId,sessionId);
        }
       
        if (conversation == null)
        {
            if(sessionId != null)
            {
                conversation = new ConversationImpl(conversationService.getConversationSessionId(),
                                                    getWebBeansContext());
            }
            else
            {
                //Used in Tests
View Full Code Here

Examples of org.apache.webbeans.spi.ConversationService

    @Override
    protected ConversationImpl newInstance(CreationalContextImpl<ConversationImpl> creationalContext)
    {
        ConversationImpl conversation = null;
        //Gets conversation service
        ConversationService conversationService = webBeansContext.getService(ConversationService.class);
        //Gets conversation id
        String conversationId = conversationService.getConversationId();      
        //Gets session id that conversation is created
        String sessionId = conversationService.getConversationSessionId();

        //If conversation id is not null, this means that
        //conversation is propogated
        if (conversationId != null)
        {
            //Gets propogated conversation
            conversation = webBeansContext.getConversationManager().getPropogatedConversation(conversationId, sessionId);
        }
       
        if (conversation == null)
        {
            if(sessionId != null)
            {
                conversation = new ConversationImpl(conversationService.getConversationSessionId(), webBeansContext);
            }
            else
            {
                //Used in Tests
                conversation = new ConversationImpl(webBeansContext);
View Full Code Here

Examples of org.apache.webbeans.spi.conversation.ConversationService

    }

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        ConversationService conversationService = ServiceLoader.getService(ConversationService.class);
       
        String conversationId = conversationService.getConversationId();
       
        Conversation conversation = null;

        if (conversationId != null)
        {
            conversation = ConversationManager.getInstance().getConversation(conversationId);
        }
        else
        {
            conversation = new ConversationImpl(conversationService.getConversationSessionId());
        }

        return conversation;
    }
View Full Code Here

Examples of org.apache.webbeans.spi.conversation.ConversationService

    }

    @Override
    protected Conversation createInstance(CreationalContext<Conversation> creationalContext)
    {
        ConversationService conversationService = ServiceLoader.getService(ConversationService.class);
       
        String conversationId = conversationService.getConversationId();
       
        Conversation conversation = null;

        if (conversationId != null)
        {
            conversation = ConversationManager.getInstance().getConversation(conversationId);
        }
        else
        {
            conversation = new ConversationImpl(conversationService.getConversationSessionId());
        }

        return conversation;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.