use of org.apache.openejb.test.stateless.BasicStatelessObject in project tomee by apache.
the class ContextLookupStatefulPojoBean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("stateful/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
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.stateless.BasicStatelessObject in project tomee by apache.
the class EncStatefulBean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicStatelessHome home = (BasicStatelessHome) ctx.lookup("java:comp/env/stateful/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
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.stateless.BasicStatelessObject in project tomee by apache.
the class ContextLookupStatefulBean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("stateful/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
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.stateless.BasicStatelessObject in project tomee by apache.
the class EncCmp2Bean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final InitialContext ctx = new InitialContext();
Assert.assertNotNull("The InitialContext is null", ctx);
final BasicStatelessHome home = (BasicStatelessHome) ctx.lookup("java:comp/env/entity/cmp/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
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.stateless.BasicStatelessObject in project tomee by apache.
the class ContextLookupBmpBean method lookupStatelessBean.
public void lookupStatelessBean() throws TestFailureException {
try {
try {
final BasicStatelessHome home = (BasicStatelessHome) ejbContext.lookup("entity/bmp/beanReferences/stateless");
Assert.assertNotNull("The EJBHome looked up is null", home);
final BasicStatelessObject object = home.createObject();
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