Examples of initRequestContext()


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

    {
        clear();
        defineManagedBean(MultipleListOfInterceptedWithExcludeClassComponent.class);

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        List<AbstractOwbBean<?>> comps = getComponents();

        Object object = getManager().getInstance(comps.get(0));

        Assert.assertTrue(object instanceof MultipleListOfInterceptedWithExcludeClassComponent);
View Full Code Here

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

   
    @Test
    public void testCallBusinessInConstructor()
    {
        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);

        clear();     
       
        SecureInterceptor.CALL = false;
        initializeInterceptorType(SecureInterceptor.class);
View Full Code Here

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

        contextFactory.destroyRequestContext(null);

        SecureInterceptor.CALL = false;

        contextFactory.initRequestContext(null);

        RequestContext ctx = (RequestContext) contextFactory.getStandardContext(RequestScoped.class);
               
        Assert.assertNull(ctx.get(bean));
               
View Full Code Here

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

        contextFactory.initSingletonContext(servletContext);
        contextFactory.initApplicationContext(servletContext);
        contextFactory.initSessionContext(session);
        contextFactory.initConversationContext(null);
        contextFactory.initRequestContext(null);
    }

    @Override
    public void startApplicationScope() throws Exception
    {
View Full Code Here

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

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

        contextFactory.initRequestContext(null);
    }

    @Override
    public void startSessionScope() throws Exception
    {
View Full Code Here

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

        defineInterceptor(WebBeansInterceptor.class);
        defineManagedBean(WInterceptorComponent.class);

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        List<AbstractOwbBean<?>> comps = getComponents();

        Object object = getManager().getInstance(comps.get(0));

        Assert.assertTrue(object instanceof WInterceptorComponent);
View Full Code Here

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

        defineInterceptor(WebBeansInterceptor.class);
        defineInterceptor(WebBeanswithMetaInterceptor.class);
        defineManagedBean(WMetaInterceptorComponent.class);

        ContextFactory contextFactory = WebBeansContext.getInstance().getContextFactory();
        contextFactory.initRequestContext(null);
        List<AbstractOwbBean<?>> comps = getComponents();

        Object object = getManager().getInstance(comps.get(0));

        Assert.assertTrue(object instanceof WMetaInterceptorComponent);
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(DependentComponent.class);
        defineManagedBean(DependentOwnerComponent.class);
        defineManagedBean(NewComponent.class);

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

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

        Assert.assertEquals(3, comps.size());
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
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.