Package org.apache.webbeans.spi

Examples of org.apache.webbeans.spi.ContextsService


public class OpenWebBeansContextControl implements ContextControl
{
    @Override
    public void startContexts()
    {
        ContextsService contextsService = getContextsService();

        startSingletonScope();
        startApplicationScope();
        startSessionScope();
        startRequestScope();
View Full Code Here


    * start scopes
    */

    private void startSingletonScope()
    {
        ContextsService contextsService = getContextsService();
        Object mockServletContext = null;
        if (isServletApiAvailable())
        {
            mockServletContext = OwbHelper.getMockServletContext();
        }
        contextsService.startContext(Singleton.class, mockServletContext);
    }
View Full Code Here

        contextsService.startContext(Singleton.class, mockServletContext);
    }

    private void startApplicationScope()
    {
        ContextsService contextsService = getContextsService();
        Object mockServletContext = null;
        if (isServletApiAvailable())
        {
            mockServletContext = OwbHelper.getMockServletContext();
        }
        contextsService.startContext(ApplicationScoped.class, mockServletContext);
    }
View Full Code Here

        contextsService.startContext(ApplicationScoped.class, mockServletContext);
    }

    private void startSessionScope()
    {
        ContextsService contextsService = getContextsService();

        Object mockSession = null;
        if (isServletApiAvailable())
        {
            mockSession = OwbHelper.getMockSession();
        }
        contextsService.startContext(SessionScoped.class, mockSession);
    }
View Full Code Here

        contextsService.startContext(SessionScoped.class, mockSession);
    }

    private void startRequestScope()
    {
        ContextsService contextsService = getContextsService();

        contextsService.startContext(RequestScoped.class, null);
    }
View Full Code Here

        contextsService.startContext(RequestScoped.class, null);
    }

    private void startConversationScope()
    {
        ContextsService contextsService = getContextsService();

        contextsService.startContext(ConversationScoped.class, null);
    }
View Full Code Here

     * stop scopes
     */

    private void stopSingletonScope()
    {
        ContextsService contextsService = getContextsService();

        Object mockServletContext = null;
        if (isServletApiAvailable())
        {
            mockServletContext = OwbHelper.getMockServletContext();
        }
        contextsService.endContext(Singleton.class, mockServletContext);
    }
View Full Code Here

        contextsService.endContext(Singleton.class, mockServletContext);
    }

    private void stopApplicationScope()
    {
        ContextsService contextsService = getContextsService();

        Object mockServletContext = null;
        if (isServletApiAvailable())
        {
            mockServletContext = OwbHelper.getMockServletContext();
        }
        contextsService.endContext(ApplicationScoped.class, mockServletContext);
    }
View Full Code Here

        contextsService.endContext(ApplicationScoped.class, mockServletContext);
    }

    private void stopSessionScope()
    {
        ContextsService contextsService = getContextsService();

        Object mockSession = null;
        if (isServletApiAvailable())
        {
            mockSession = OwbHelper.getMockSession();
        }
        contextsService.endContext(SessionScoped.class, mockSession);
    }
View Full Code Here

        contextsService.endContext(SessionScoped.class, mockSession);
    }

    private void stopRequestScope()
    {
        ContextsService contextsService = getContextsService();

        contextsService.endContext(RequestScoped.class, null);
    }
View Full Code Here

TOP

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

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.