Examples of prePassivateEasyBeansLifeCycle()


Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSFSBLifeCycle.prePassivateEasyBeansLifeCycle()

        // preDestroy should increment counter
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertEquals(internalCounter++, statefulBean.getCounter());

        // prePassivate should increment counter
        lifeCycle.prePassivateEasyBeansLifeCycle();
        assertEquals(internalCounter++, statefulBean.getCounter());

        // postActivate should increment counter
        lifeCycle.postActivateEasyBeansLifeCycle();
        assertEquals(internalCounter++, statefulBean.getCounter());
View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSFSBLifeCycle.prePassivateEasyBeansLifeCycle()

     */
    @Test
    public void testStatefulPrePassivate() {
        assertFalse(statefulBean.isprePassivateCalled());
        EasyBeansSFSBLifeCycle lifeCycle = getSFSBLifeCycle();
        lifeCycle.prePassivateEasyBeansLifeCycle();
        assertTrue(statefulBean.isprePassivateCalled());
    }

    /**
     * Test the PostActivate on stateful bean.
View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSFSBLifeCycle.prePassivateEasyBeansLifeCycle()

        assertEquals(1, statefulBean.getCounter());
        // and the counter of the super class
        assertEquals(1, statefulBean.getSuperLifeCycleCounter());

        // increment counter of default class
        lifeCycle.prePassivateEasyBeansLifeCycle();
        assertEquals(2, statefulBean.getCounter());
        // prePassivate should decrement the counter
        assertEquals(0, statefulBean.getSuperLifeCycleCounter());
    }
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.