use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class EncMdbBean method lookupStatefulBean.
@Override
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicStatefulHome home = (BasicStatefulHome) ctx.lookup("java:comp/env/stateless/beanReferences/stateful");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class ContextLookupMdbBean method lookupStatefulBean.
@Override
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) mdbContext.lookup("stateless/beanReferences/stateful");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class ContextLookupBmpBean method lookupStatefulBean.
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("entity/bmp/beanReferences/stateful");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class ContextLookupStatelessBean method lookupStatefulBean.
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("stateless/beanReferences/stateful");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class ContextLookupCmpBean method lookupStatefulBean.
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) ejbContext.lookup("entity/cmp/beanReferences/stateful");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatefulObject object = home.createObject("Enc Bean");
Assert.assertNotNull("The EJBObject is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
Aggregations