Package org.apache.webbeans.spi

Examples of org.apache.webbeans.spi.ContextsService


     * @return the ContextService for the current ClassLoader
     */
    private static ContextsService getContextsService()
    {
        ClassLoader cl = WebBeansUtil.getCurrentClassLoader();
        ContextsService cs = contextServices.get(cl);
        if (cs == null)
        {
            cs = ServiceLoader.getService(ContextsService.class);
            contextServices.put(cl, cs);
        }
View Full Code Here


   
    public static void initRequestContext(Object request)
    {
        try
        {
            ContextsService contextService = getContextsService();
            contextService.startContext(RequestScoped.class, request);
        }
        catch (Exception e)
        {
            logger.error(e);
        }
View Full Code Here

        return new CustomContextImpl(context);
    }
   
    public static void destroyRequestContext(Object request)
    {
        ContextsService contextService = getContextsService();
        contextService.endContext(RequestScoped.class, request);
    }
View Full Code Here

    public static void initSessionContext(Object session)
    {
        try
        {
            ContextsService contextService = getContextsService();
            contextService.startContext(SessionScoped.class, session);
        }
        catch (Exception e)
        {
            logger.error(e);
        }
View Full Code Here

        }
    }

    public static void destroySessionContext(Object session)
    {
        ContextsService contextService = getContextsService();
        contextService.endContext(SessionScoped.class, session);
    }
View Full Code Here

     */
    public static void initApplicationContext(Object parameter)
    {
        try
        {
            ContextsService contextService = getContextsService();
            contextService.startContext(ApplicationScoped.class, parameter);
        }
        catch (Exception e)
        {
            logger.error(e);
        }
View Full Code Here

     *
     * @param parameter parameter object
     */
    public static void destroyApplicationContext(Object parameter)
    {
        ContextsService contextService = getContextsService();
        contextService.endContext(ApplicationScoped.class, parameter);
    }
View Full Code Here

   
    public static void initSingletonContext(Object parameter)
    {
        try
        {
            ContextsService contextService = getContextsService();
            contextService.startContext(Singleton.class, parameter);
        }
        catch (Exception e)
        {
            logger.error(e);           
        }
View Full Code Here

        }
    }
   
    public static void destroySingletonContext(Object parameter)
    {
        ContextsService contextService = getContextsService();
        contextService.endContext(Singleton.class, parameter);
    }
View Full Code Here

    public static void initConversationContext(Object context)
    {
        try
        {
            ContextsService contextService = getContextsService();
            contextService.startContext(ConversationScoped.class, context);
        }
        catch (Exception e)
        {
            logger.error(e);           
        }
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.