use of org.apache.openejb.test.stateful.BasicStatefulObject in project tomee by apache.
the class EncSingletonBean method lookupStatefulBean.
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/singleton/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 ContextLookupMdbPojoBean method lookupStatefulBean.
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) getMessageDrivenContext().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 EncBmpBean method lookupStatefulBean.
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/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 EncStatelessBean method lookupStatefulBean.
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 ContextLookupStatelessPojoBean method lookupStatefulBean.
public void lookupStatefulBean() throws TestFailureException {
try {
try {
final BasicStatefulHome home = (BasicStatefulHome) getSessionContext().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);
}
}
Aggregations