Package org.apache.webbeans.newtests.contexts.session.common

Examples of org.apache.webbeans.newtests.contexts.session.common.PersonalDataBean


        startContainer(classes);
       
        PersonalDataBean.POST_CONSTRUCT = false;
        PersonalDataBean.PRE_DESTROY = false;

        PersonalDataBean dataBean = getInstance(PersonalDataBean.class);
        Assert.assertNotNull(dataBean);
       
        dataBean.business();
       
        Assert.assertTrue(PersonalDataBean.POST_CONSTRUCT);
               
        shutDownContainer();
       
View Full Code Here


        startContainer(classes);
       
        AppScopedBean appBeanInstance = getInstance(AppScopedBean.class);
        Assert.assertNotNull(appBeanInstance);
        PersonalDataBean pdb1 = appBeanInstance.getPdb().getInstance();
        Assert.assertNotNull(pdb1);
       
        // now we reset the session Context so we should get a new contextual instance.
        getWebBeansContext().getContextsService().endContext(SessionScoped.class, null);
        getWebBeansContext().getContextsService().startContext(SessionScoped.class, null);
       
        PersonalDataBean pdb2 = appBeanInstance.getPdb().getInstance();
        Assert.assertNotNull(pdb2);
       
        // pdb1 and pdb2 are in different sessions, so they must not be the same instance!
        Assert.assertTrue(pdb1 != pdb2);
    }
View Full Code Here

TOP

Related Classes of org.apache.webbeans.newtests.contexts.session.common.PersonalDataBean

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.