use of org.apache.openejb.test.entity.bmp.BasicBmpHome in project tomee by apache.
the class EncMdbBean method lookupEntityBean.
@Override
public void lookupEntityBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicBmpHome home = (BasicBmpHome) ctx.lookup("java:comp/env/stateless/beanReferences/bmp_entity");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicBmpObject 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.entity.bmp.BasicBmpHome in project tomee by apache.
the class ContextLookupSingletonPojoBean method lookupEntityBean.
public void lookupEntityBean() throws TestFailureException {
try {
try {
final BasicBmpHome home = (BasicBmpHome) getSessionContext().lookup("singleton/beanReferences/bmp_entity");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicBmpObject 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