Search in sources :

Example 6 with SimpleInterface

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

Example 7 with SimpleInterface

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());
}
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 8 with SimpleInterface

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());
}
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 9 with SimpleInterface

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());
}
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

SimpleInterface (org.jboss.as.test.integration.ejb.home.remotehome.SimpleInterface)9 Test (org.junit.Test)9 SimpleStatefulHome (org.jboss.as.test.integration.ejb.home.remotehome.SimpleStatefulHome)5 SimpleHome (org.jboss.as.test.integration.ejb.home.remotehome.SimpleHome)4 InSequence (org.jboss.arquillian.junit.InSequence)2 NoSuchObjectException (java.rmi.NoSuchObjectException)1 EJBException (javax.ejb.EJBException)1