Package org.apache.webbeans.context

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


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

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

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

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


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

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

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

        AbstractOwbBean<?> obj = comps.get(0);
View Full Code Here

        RequestContext ctx =  (RequestContext)contextFactory.getStandardContext(RequestScoped.class);
       
        if(ctx == null)
        {
            contextFactory.initRequestContext(null);
        }
       
        return (AbstractContext) contextFactory.getStandardContext(RequestScoped.class);
    }
View Full Code Here

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

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

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

        Object object = getManager().getInstance(comps.get(0));
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.