Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.ApplicationContext


        this.webBeansContext = webBeansContext;
        supportsConversation =  webBeansContext.getOpenWebBeansConfiguration().supportsConversation();
        failoverService = webBeansContext.getService(FailOverService.class);
        conversationManager = webBeansContext.getConversationManager();

        sharedApplicationContext = new ApplicationContext();
        sharedApplicationContext.setActive(true);
    }
View Full Code Here


        if (sharedApplicationContext != null && servletContext == null)
        {
            return;
        }

        ApplicationContext newApplicationContext = new ApplicationContext();
        newApplicationContext.setActive(true);

        if (servletContext != null)
        {
            currentApplicationContexts.put(servletContext, newApplicationContext);
View Full Code Here

     */
    private void destroyApplicationContext(ServletContext servletContext)
    {
        //look for thread local
        //this can be set by initRequestContext
        ApplicationContext context = null;
       
        //Looking the context from saved context
        //This is used in real web applications
        if(servletContext != null)
        {
            context = currentApplicationContexts.get(servletContext);  
        }
       
        //using in tests
        if(context == null)
        {
            context = this.sharedApplicationContext;
        }
       
        //Destroy context
        if(context != null)
        {
            context.destroy();
        }
       
        //Remove from saved contexts
        if(servletContext != null)
        {
View Full Code Here

    }

   
    private void startApplicationContext(Object instance)
    {
        ApplicationContext ctx = new ApplicationContext();
        ctx.setActive(true);
       
        applicationContext = ctx;
    }
View Full Code Here

        this.webBeansContext = webBeansContext;
        supportsConversation =  webBeansContext.getOpenWebBeansConfiguration().supportsConversation();
        failoverService = webBeansContext.getService(FailOverService.class);
        conversationManager = webBeansContext.getConversationManager();

        sharedApplicationContext = new ApplicationContext();
        sharedApplicationContext.setActive(true);
    }
View Full Code Here

            {
                applicationContexts.set(currentApplicationContexts.get(servletContext));
            }
            else
            {
                ApplicationContext currentApplicationContext = new ApplicationContext();
                currentApplicationContext.setActive(true);
                currentApplicationContexts.put(servletContext, currentApplicationContext);

                applicationContexts.set(currentApplicationContext);
            }
        }
View Full Code Here

     */
    private void destroyApplicationContext(ServletContext servletContext)
    {
        //look for thread local
        //this can be set by initRequestContext
        ApplicationContext context = null;
       
        //Looking the context from saved context
        //This is used in real web applications
        if(servletContext != null)
        {
            context = currentApplicationContexts.get(servletContext);  
        }
       
        //using in tests
        if(context == null)
        {
            context = getApplicationContext();
        }
       
        //Destroy context
        if(context != null)
        {
            context.destroy();
        }
       
        //Remove from saved contexts
        if(servletContext != null)
        {
View Full Code Here

    }

   
    private void startApplicationContext(Object instance) throws Exception
    {
        ApplicationContext ctx = new ApplicationContext();
        ctx.setActive(true);
       
        applicationContext = ctx;
    }
View Full Code Here

            applicationContext.set(currentApplicationContexts.get(servletContext));
        }
       
        else
        {
            ApplicationContext currentApplicationContext = new ApplicationContext();        
            currentApplicationContext.setActive(true);
           
            if(servletContext != null)
            {
                currentApplicationContexts.put(servletContext, currentApplicationContext);
               
View Full Code Here

     */
    private void destroyApplicationContext(ServletContext servletContext)
    {
        //look for thread local
        //this can be set by initRequestContext
        ApplicationContext context = null;
       
        //Looking the context from saved context
        //This is used in real web applications
        if(servletContext != null)
        {
            context = currentApplicationContexts.get(servletContext);  
        }
       
        //using in tests
        if(context == null)
        {
            context = getApplicationContext();
        }
       
        //Destroy context
        if(context != null)
        {
            context.destroy();
        }
       
        //Remove from saved contexts
        if(servletContext != null)
        {
View Full Code Here

TOP

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

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.