use of org.apache.openejb.test.entity.bmp.BasicBmpHome in project tomee by apache.
the class EncSingletonBean method lookupEntityBean.
//=============================
// Home interface methods
//
//
// Home interface methods
//=============================
//=============================
// Remote interface methods
//
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/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);
}
}
use of org.apache.openejb.test.entity.bmp.BasicBmpHome in project tomee by apache.
the class ContextLookupMdbBean method lookupEntityBean.
@Override
public void lookupEntityBean() throws TestFailureException {
try {
try {
final BasicBmpHome home = (BasicBmpHome) mdbContext.lookup("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 EncStatelessBean method lookupEntityBean.
//=============================
// Home interface methods
//
//
// Home interface methods
//=============================
//=============================
// Remote interface methods
//
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 ContextLookupMdbPojoBean method lookupEntityBean.
public void lookupEntityBean() throws TestFailureException {
try {
try {
final BasicBmpHome home = (BasicBmpHome) getMessageDrivenContext().lookup("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 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);
}
}
Aggregations