Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.ContextFactory


    }

    public void startContexts() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        contextFactory.initSingletonContext(servletContext);
        contextFactory.initApplicationContext(servletContext);
        contextFactory.initSessionContext(session);
        contextFactory.initConversationContext(null);
        contextFactory.initRequestContext(null);
    }
View Full Code Here


    }

    public void startApplicationScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        contextFactory.initApplicationContext(servletContext);
    }
View Full Code Here

    }

    public void startConversationScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        contextFactory.initConversationContext(null);
    }
View Full Code Here

    }

    public void startRequestScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        contextFactory.initRequestContext(null);
    }
View Full Code Here

    }

    public void startSessionScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        contextFactory.initSessionContext(session);
    }
View Full Code Here

    }

    public void stopContexts() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        stopSessionScope();
        stopConversationScope();
        stopRequestScope();
        stopApplicationScope();

        Context context = contextFactory.getStandardContext(ContextTypes.SINGLETON);
        if(context != null && context.isActive())
        {
            contextFactory.destroySingletonContext(servletContext);
        }
        else
        {
            if(logger.wblWillLogWarn())
            {
View Full Code Here

    }

    public void stopApplicationScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        Context context = contextFactory.getStandardContext(ContextTypes.APPLICATION);
        if(context != null && context.isActive())
        {
            contextFactory.destroyApplicationContext(servletContext);
        }
        else
        {
            if(logger.wblWillLogWarn())
            {
View Full Code Here

    }

    public void stopConversationScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        Context context = contextFactory.getStandardContext(ContextTypes.CONVERSATION);
        if(context != null && context.isActive())
        {
            contextFactory.destroyConversationContext();
        }
        else
        {
            if(logger.wblWillLogWarn())
            {
View Full Code Here

    }

    public void stopRequestScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        Context context = contextFactory.getStandardContext(ContextTypes.REQUEST);
        if(context != null && context.isActive())
        {
            contextFactory.destroyRequestContext(null);
        }
        else
        {
            if(logger.wblWillLogWarn())
            {
View Full Code Here

    }

    public void stopSessionScope() throws Exception
    {
        WebBeansContext webBeansContext = WebBeansContext.getInstance();
        ContextFactory contextFactory = webBeansContext.getContextFactory();

        Context context = contextFactory.getStandardContext(ContextTypes.SESSION);
        if(context != null && context.isActive())
        {
            contextFactory.destroySessionContext(session);
        }
        else
        {
            if(logger.wblWillLogWarn())
            {
View Full Code Here

TOP

Related Classes of org.apache.webbeans.context.ContextFactory

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.