use of org.apache.openejb.test.stateful.BasicStatefulPojoBean in project tomee by apache.
the class EncSingletonBean method lookupStatefulBusinessLocalBean.
public void lookupStatefulBusinessLocalBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicStatefulPojoBean object = (BasicStatefulPojoBean) ctx.lookup("java:comp/env/singleton/beanReferences/stateful-business-localbean");
Assert.assertNotNull("The EJB BusinessLocalBean 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.BasicStatefulPojoBean in project tomee by apache.
the class EncStatelessBean method lookupStatefulBusinessLocalBean.
public void lookupStatefulBusinessLocalBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicStatefulPojoBean object = (BasicStatefulPojoBean) ctx.lookup("java:comp/env/stateless/beanReferences/stateful-business-localbean");
Assert.assertNotNull("The EJB BusinessLocalBean is null", object);
} catch (final Exception e) {
Assert.fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
} catch (final AssertionFailedError afe) {
throw new TestFailureException(afe);
}
}
Aggregations