Package org.apache.webbeans.spi

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


    @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

    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

    @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

    @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

    @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

TOP

Related Classes of org.apache.webbeans.spi.ConversationService

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.