Package org.apache.webbeans.context

Examples of org.apache.webbeans.context.SingletonContext


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

        SingletonContext newSingletonContext = new SingletonContext();
        newSingletonContext.setActive(true);

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


     * Destroy singleton context.
     * @param servletContext servlet context
     */
    private void destroySingletonContext(ServletContext servletContext)
    {
        SingletonContext context = null;

        //look for saved context
        if(servletContext != null)
        {
            context = currentSingletonContexts.get(servletContext);
        }
       
        //using in tests
        if(context == null)
        {
            context = this.sharedSingletonContext;
        }       
       
        //context is not null
        //destroyDependents it
        if(context != null)
        {
            context.destroy();
        }

        //remove it from saved contexts
        if(servletContext != null)
        {
View Full Code Here

   
    private void startSingletonContext(Object object)
    {
       
        SingletonContext ctx = new SingletonContext();
        ctx.setActive(true);
       
        singletonContext.set(ctx);
    }
View Full Code Here

            singletonContexts.set(currentSingletonContexts.get(servletContext));
        }
       
        else
        {
            SingletonContext context = new SingletonContext();
            context.setActive(true);
           
            if(servletContext != null)
            {
                currentSingletonContexts.put(servletContext, context);
               
View Full Code Here

     * Destroy singleton context.
     * @param servletContext servlet context
     */
    private void destroySingletonContext(ServletContext servletContext)
    {
        SingletonContext context = null;

        //look for saved context
        if(servletContext != null)
        {
            context = currentSingletonContexts.get(servletContext);
        }
       
        //using in tests
        if(context == null)
        {
            context = getSingletonContext();
        }       
       
        //context is not null
        //destroyDependents it
        if(context != null)
        {
            context.destroy();
        }

        //remove it from saved contexts
        if(servletContext != null)
        {
View Full Code Here

   
    private void startSingletonContext(Object object) throws Exception
    {
       
        SingletonContext ctx = new SingletonContext();
        ctx.setActive(true);
       
        singletonContext.set(ctx);
    }
View Full Code Here

            singletonContext.set(currentSingletonContexts.get(servletContext));
        }
       
        else
        {
            SingletonContext context = new SingletonContext();
            context.setActive(true);
           
            if(servletContext != null)
            {
                currentSingletonContexts.put(servletContext, context);
               
View Full Code Here

     * Destroy singleton context.
     * @param servletContext servlet context
     */
    private void destroySingletonContext(ServletContext servletContext)
    {
        SingletonContext context = null;

        //look for saved context
        if(servletContext != null)
        {
            context = currentSingletonContexts.get(servletContext);
        }
       
        //using in tests
        if(context == null)
        {
            context = getSingletonContext();
        }       
       
        //context is not null
        //destroyDependents it
        if(context != null)
        {
            context.destroy();
        }

        //remove it from saved contexts
        if(servletContext != null)
        {
View Full Code Here

   
    private void startSingletonContext(Object object) throws Exception
    {
       
        SingletonContext ctx = new SingletonContext();
        ctx.setActive(true);
       
        singletonContext.set(ctx);
    }
View Full Code Here

            singletonContext.set(currentSingletonContexts.get(servletContext));
        }
       
        else
        {
            SingletonContext context = new SingletonContext();
            context.setActive(true);
           
            if(servletContext != null)
            {
                currentSingletonContexts.put(servletContext, context);
               
View Full Code Here

TOP

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

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.