Examples of initRequestContext()


Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

    public AbstractContext getRequestContext() {
        ContextFactory contextFactory = WebBeansContext.currentInstance().getContextFactory();
        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);

        if (ctx == null) {
            contextFactory.initRequestContext(null);
        }

        return (AbstractContext) contextFactory.getStandardContext(ContextTypes.REQUEST);
    }
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

    public AbstractContext getRequestContext() {
        ContextFactory contextFactory = WebBeansContext.currentInstance().getContextFactory();
        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);

        if (ctx == null) {
            contextFactory.initRequestContext(null);
        }

        return (AbstractContext) contextFactory.getStandardContext(ContextTypes.REQUEST);
    }
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

    public AbstractContext getRequestContext() {
        ContextFactory contextFactory = WebBeansContext.currentInstance().getContextFactory();
        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);

        if (ctx == null) {
            contextFactory.initRequestContext(null);
        }

        return (AbstractContext) contextFactory.getStandardContext(ContextTypes.REQUEST);
    }
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

        defineManagedBean(Producer1ConsumerComponent.class);

        List<AbstractOwbBean<?>> comps = getComponents();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        contextFactory.initApplicationContext(null);

        Assert.assertEquals(4, getDeployedComponents());

        Object obj = getManager().getInstance(comps.get(0));
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

    public void testDisposal1()
    {
        clear();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        contextFactory.initSessionContext(null);

        defineManagedBean(Disposal1.class);

        @SuppressWarnings("unchecked")
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

                contextFactory.activateContext(scopeType);
                return 0;
            }
            else if(ctx == null)
            {
                contextFactory.initRequestContext(null);
                return 1;
            }
           
        }
       
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

        defineManagedBean(TypeLiteralComponent.class);
        defineManagedBean(InjectedTypeLiteralComponent.class);
        List<AbstractOwbBean<?>> comps = getComponents();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);

        Assert.assertEquals(2, comps.size());

        TypeLiteralComponent userComponent = (TypeLiteralComponent) getManager().getInstance(comps.get(0));
        InjectedTypeLiteralComponent tc = (InjectedTypeLiteralComponent) getManager().getInstance(comps.get(1));
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

        defineManagedBean(TypeLiteralComponent.class);
        List<AbstractOwbBean<?>> comps = getComponents();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);

        Assert.assertEquals(1, comps.size());

        TypeLiteral<ITypeLiteralComponent<List<String>>> tl = new TypeLiteral<ITypeLiteralComponent<List<String>>>()
        {
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

        defineManagedBean(ScopeAdaptorComponent.class);
        defineManagedBean(ScopeAdaptorInjectorComponent.class);

        Object session = getSession();
        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        contextFactory.initSessionContext(session);
        contextFactory.initApplicationContext(null);

        List<AbstractOwbBean<?>> comps = getComponents();
View Full Code Here

Examples of org.apache.webbeans.context.ContextFactory.initRequestContext()

        defineManagedBean(DisposalMethodComponent.class);

        List<AbstractOwbBean<?>> comps = getComponents();

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        contextFactory.initApplicationContext(null);

        Assert.assertEquals(2, comps.size());

        Object producerResult = getInstanceByName("service");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.