Package org.jboss.as.test.integration.ejb.home.localhome

Examples of org.jboss.as.test.integration.ejb.home.localhome.SimpleStatefulLocalHome


    }

    @Test
    public void testStatefulLocalHome() throws Exception {
        final String message = "Bean Message";
        final SimpleStatefulLocalHome home = (SimpleStatefulLocalHome) iniCtx.lookup("java:module/SimpleStatefulLocalBean!" + SimpleStatefulLocalHome.class.getName());
        SimpleLocalInterface ejbInstance = home.createSimple(message);
        Assert.assertEquals(message, ejbInstance.sayHello());
        ejbInstance = home.createComplex("hello", "world");
        Assert.assertEquals("hello world", ejbInstance.sayHello());
    }
View Full Code Here


    }

    @Test
    public void testGetEjbLocalObject() throws Exception {
        final String message = "Bean Message";
        final SimpleStatefulLocalHome home = (SimpleStatefulLocalHome) iniCtx.lookup("java:module/SimpleStatefulLocalBean!" + SimpleStatefulLocalHome.class.getName());
        SimpleLocalInterface ejbInstance = home.createSimple(message);
        try {
            Assert.assertEquals(message, ejbInstance.otherMethod());
        } catch (EJBException e) {
            Assert.assertEquals(IllegalStateException.class, e.getCause().getClass());
        }
View Full Code Here

    }

    @Test
    public void testStatefulLocalHome() throws Exception {
        final String message = "Bean Message";
        final SimpleStatefulLocalHome home = (SimpleStatefulLocalHome) iniCtx.lookup("java:module/SimpleStatefulLocalHomeBean!" + SimpleStatefulLocalHome.class.getName());
        SimpleLocalInterface ejbInstance = home.createSimple(message);
        Assert.assertEquals(message, ejbInstance.sayHello());
        ejbInstance = home.createComplex("hello", "world");
        Assert.assertEquals("hello world", ejbInstance.sayHello());
    }
View Full Code Here

    }

    @Test
    public void testgetEjbLocalObject() throws Exception {
        final String message = "Bean Message";
        final SimpleStatefulLocalHome home = (SimpleStatefulLocalHome) iniCtx.lookup("java:module/SimpleStatefulLocalHomeBean!" + SimpleStatefulLocalHome.class.getName());
        SimpleLocalInterface ejbInstance = home.createSimple(message);
        Assert.assertEquals(message, ejbInstance.otherMethod());
        ejbInstance = home.createComplex("hello", "world");
        Assert.assertEquals("hello world", ejbInstance.otherMethod());
    }
View Full Code Here

TOP

Related Classes of org.jboss.as.test.integration.ejb.home.localhome.SimpleStatefulLocalHome

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.