Examples of postConstructEasyBeansLifeCycle()


Examples of org.ow2.easybeans.api.bean.EasyBeansMDB.postConstructEasyBeansLifeCycle()

                throw new CreatePoolItemException(WAITING_TIME_BEFORE_CREATION, "Cannot inject resource in the instance", e);
            }


            // post construct callback
            instance.postConstructEasyBeansLifeCycle();
        } finally {
            Thread.currentThread().setContextClassLoader(oldClassLoader);
        }

        return instance;
View Full Code Here

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

        if (statefulBean instanceof EasyBeansSFSBLifeCycle) {
            lifeCycle = (EasyBeansSFSBLifeCycle) statefulBean;
        }

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

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

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

     */
    @Test
    public void testStatefulPostConstruct() {
        assertFalse(statefulBean.isPostConstructCalled());
        EasyBeansSFSBLifeCycle lifeCycle = getSFSBLifeCycle();
        lifeCycle.postConstructEasyBeansLifeCycle();
        assertTrue(statefulBean.isPostConstructCalled());
    }

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

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

    public void testStatelessBeanCallbacks() {
        assertEquals(0, statelessBean.getCounter());
        EasyBeansSLSBLifeCycle lifeCycle = getSLSBLifeCycle();

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

        // preDestroy should decrement counter
        lifeCycle.preDestroyEasyBeansLifeCycle();
        assertEquals(0, statelessBean.getCounter());
View Full Code Here

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

     */
    @Test
    public void testStatelessPostConstruct() {
        assertFalse(statelessBean.isPostConstructCalled());
        EasyBeansSLSBLifeCycle lifeCycle = getSLSBLifeCycle();
        lifeCycle.postConstructEasyBeansLifeCycle();

        assertTrue(statelessBean.isPostConstructCalled());
    }

    /**
 
View Full Code Here

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

     */
    @Test
    public void testStateless2PostConstruct() {
        assertFalse(statelessBean2.isPostConstructCalled());
        EasyBeansSLSBLifeCycle lifeCycle = getSLSB2LifeCycle();
        lifeCycle.postConstructEasyBeansLifeCycle();

        assertTrue(statelessBean2.isPostConstructCalled());
    }

    /**
 
View Full Code Here

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

        assertEquals(0, statelessBean3.getCounter());

        EasyBeansSLSBLifeCycle lifeCycle = getSLSB3LifeCycle();

        // 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.postConstructEasyBeansLifeCycle()

        assertEquals(0, statelessBean.getSuperLifeCycleCounter());

        EasyBeansSLSBLifeCycle lifeCycle = getSLSBLifeCycle();

        // postConstruct should increment the counter
        lifeCycle.postConstructEasyBeansLifeCycle();
        assertEquals(1, statelessBean.getCounter());
        // and the counter of the super class
        assertEquals(1, statelessBean.getSuperLifeCycleCounter());

        // preDestroy should decrement the counter
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.