Examples of preDestroyEasyBeansLifeCycle()


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

        // postConstruct should increment the counter
        lifeCycle.postConstructEasyBeansLifeCycle();
        assertEquals(internalCounter++, statefulBean.getCounter());

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

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

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

     */
    @Test
    public void testStatefulPreDestroy() {
        assertFalse(statefulBean.isPreDestroyCalled());
        EasyBeansSFSBLifeCycle lifeCycle = getSFSBLifeCycle();
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertTrue(statefulBean.isPreDestroyCalled());
    }

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

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSLSBLifeCycle.preDestroyEasyBeansLifeCycle()

        // postConstruct should increment the counter
        lifeCycle.postConstructEasyBeansLifeCycle();
        assertEquals(1, statelessBean.getCounter());

        // preDestroy should decrement counter
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertEquals(0, statelessBean.getCounter());
    }

    /**
     * Test the postConstruct on stateless bean.
View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSLSBLifeCycle.preDestroyEasyBeansLifeCycle()

     */
    @Test
    public void testStatelessPreDestroy() {
        assertFalse(statelessBean.isPreDestroyCalled());
        EasyBeansSLSBLifeCycle lifeCycle = getSLSBLifeCycle();
        lifeCycle.preDestroyEasyBeansLifeCycle();

        assertTrue(statelessBean.isPreDestroyCalled());
    }


View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSLSBLifeCycle.preDestroyEasyBeansLifeCycle()

     */
    @Test
    public void testStateless2PreDestroy() {
        assertFalse(statelessBean2.isPreDestroyCalled());
        EasyBeansSLSBLifeCycle lifeCycle = getSLSB2LifeCycle();
        lifeCycle.preDestroyEasyBeansLifeCycle();

        assertTrue(statelessBean2.isPreDestroyCalled());
    }


View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSLSBLifeCycle.preDestroyEasyBeansLifeCycle()

        // postConstruct should increment the counter
        lifeCycle.postConstructEasyBeansLifeCycle();
        assertEquals(1, statelessBean3.getCounter());

        // preDestroy should decrement the counter
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertEquals(0, statelessBean3.getCounter());
    }


    /**
 
View Full Code Here

Examples of org.ow2.easybeans.api.bean.lifecycle.EasyBeansSLSBLifeCycle.preDestroyEasyBeansLifeCycle()

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

        // preDestroy should decrement the counter
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertEquals(0, statelessBean.getCounter());
        assertEquals(0, statelessBean.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.