Package org.apache.webbeans.newtests.interceptors.beans

Examples of org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean


            CreationalContext<ApplicationScopedBean> ctx = getBeanManager().createCreationalContext(bean);
           
            Object reference1 = getBeanManager().getReference(bean, ApplicationScopedBean.class, ctx);
            Assert.assertNotNull(reference1);
           
            ApplicationScopedBean app = (ApplicationScopedBean) reference1;

            app.getJ();
            Assert.assertTrue(TransactionInterceptor.interceptorCount == 1);

            app.getJ();
            Assert.assertTrue(TransactionInterceptor.interceptorCount == 1);

            app.getJ();
            Assert.assertTrue(TransactionInterceptor.interceptorCount == 1);
}
View Full Code Here


            CreationalContext<ApplicationScopedBean> ctx = getBeanManager().createCreationalContext(bean);
           
            Object reference1 = getBeanManager().getReference(bean, ApplicationScopedBean.class, ctx);
            Assert.assertNotNull(reference1);
           
            ApplicationScopedBean app = (ApplicationScopedBean) reference1;

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(1, TransactionInterceptor.count);

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(2, TransactionInterceptor.count);

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(3, TransactionInterceptor.count);
}
View Full Code Here

            CreationalContext<ApplicationScopedBean> ctx = getBeanManager().createCreationalContext(bean);
           
            Object reference1 = getBeanManager().getReference(bean, ApplicationScopedBean.class, ctx);
            Assert.assertNotNull(reference1);
           
            ApplicationScopedBean app = (ApplicationScopedBean) reference1;

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(1, TransactionInterceptor.count);

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(2, TransactionInterceptor.count);

            app.getJ();
            Assert.assertEquals(1, TransactionInterceptor.interceptorCount);
            Assert.assertEquals(3, TransactionInterceptor.count);
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.newtests.interceptors.beans.ApplicationScopedBean

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.