use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface in project wildfly by wildfly.
the class StatefulEJBRemoteHomeRuntimeNameTestCase method testStatefulLocalHome.
@Test
@InSequence(value = 2)
public void testStatefulLocalHome() throws Exception {
SimpleStatefulHome home = (SimpleStatefulHome) context.lookup(getEJBHomeJNDIBinding());
SimpleInterface ejbInstance = home.createSimple("Hello World");
Assert.assertEquals("Hello World", ejbInstance.sayHello());
home = (SimpleStatefulHome) ejbInstance.getEJBHome();
ejbInstance = home.createSimple("Hello World");
Assert.assertEquals("Hello World", ejbInstance.sayHello());
}
use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface in project wildfly by wildfly.
the class SimpleHomeTestCase method testStatelessLocalHome.
@Test
public void testStatelessLocalHome() throws Exception {
final SimpleHome home = (SimpleHome) iniCtx.lookup("java:module/SimpleHomeBean!" + SimpleHome.class.getName());
final SimpleInterface ejbInstance = home.createSimple();
Assert.assertEquals("Hello World", ejbInstance.sayHello());
}
use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface in project wildfly by wildfly.
the class SimpleHomeTestCase method testGetEjbLocalHome.
@Test
public void testGetEjbLocalHome() throws Exception {
final SimpleHome home = (SimpleHome) iniCtx.lookup("java:module/SimpleHomeBean!" + SimpleHome.class.getName());
final SimpleInterface ejbInstance = home.createSimple();
Assert.assertEquals("Hello World", ejbInstance.otherMethod());
}
use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface in project wildfly by wildfly.
the class StatelessEJBRemoteHomeRuntimeNameTestCase method testStatelessLocalHome.
@Test
@InSequence(value = 2)
public void testStatelessLocalHome() throws Exception {
SimpleHome home = (SimpleHome) context.lookup(getEJBHomeJNDIBinding());
SimpleInterface ejbInstance = home.createSimple();
Assert.assertEquals("Hello World", ejbInstance.sayHello());
home = (SimpleHome) ejbInstance.getEJBHome();
ejbInstance = home.createSimple();
Assert.assertEquals("Hello World", ejbInstance.sayHello());
}
Aggregations