Search in sources :

Example 1 with SimpleHome

use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome in project wildfly by wildfly.

the class AnnotationHomeTestCase method testGetEjbHome.

@Test
public void testGetEjbHome() throws Exception {
    final SimpleHome home = (SimpleHome) iniCtx.lookup("java:module/SimpleStatelessBean!" + SimpleHome.class.getName());
    Assert.assertTrue(home.createSimple().getEJBHome() instanceof SimpleHome);
}
Also used : SimpleHome(org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome) Test(org.junit.Test)

Example 2 with SimpleHome

use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome in project wildfly by wildfly.

the class AnnotationHomeTestCase method testStatelessLocalHome.

@Test
public void testStatelessLocalHome() throws Exception {
    final SimpleHome home = (SimpleHome) iniCtx.lookup("java:module/SimpleStatelessBean!" + SimpleHome.class.getName());
    final SimpleInterface ejbInstance = home.createSimple();
    Assert.assertEquals("Hello World", ejbInstance.sayHello());
}
Also used : SimpleHome(org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome) SimpleInterface(org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface) Test(org.junit.Test)

Example 3 with SimpleHome

use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome 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());
}
Also used : SimpleHome(org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome) SimpleInterface(org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface) Test(org.junit.Test)

Example 4 with SimpleHome

use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome 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());
}
Also used : SimpleHome(org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome) SimpleInterface(org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface) Test(org.junit.Test)

Example 5 with SimpleHome

use of org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome 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());
}
Also used : SimpleHome(org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome) SimpleInterface(org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface) Test(org.junit.Test) InSequence(org.jboss.arquillian.junit.InSequence)

Aggregations

SimpleHome (org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome)5 Test (org.junit.Test)5 SimpleInterface (org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface)4 InSequence (org.jboss.arquillian.junit.InSequence)1