use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class StatefulRmiIiopTests method test52_returnNestedHandle.
public void test52_returnNestedHandle() {
try {
final Object obj = initialContext.lookup("client/tests/stateful/EncBean");
final EncStatefulHome home = (EncStatefulHome) obj;
assertNotNull("The EJBHome returned from JNDI is null", home);
final EncStatefulObject object = home.create("test_52 StatefulBean");
assertNotNull("The EJBObject created is null", object);
final Handle expected = object.getHandle();
assertNotNull("The EJBObject Handle returned is null", expected);
assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());
final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
final Handle actual = (Handle) graph.getObject();
assertNotNull("The EJBObject Handle returned is null", actual);
assertNotNull("The EJBObject in the Handle is null", actual.getEJBObject());
final EJBObject exp = expected.getEJBObject();
final EJBObject act = actual.getEJBObject();
assertTrue("The EJBObjects in the Handles are not identical", exp.isIdentical(act));
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class StatelessRmiIiopTests method test38_returnNestedEJBHome2.
public void test38_returnNestedEJBHome2() {
try {
final ObjectGraph graph = ejbObject.returnNestedEJBHome();
assertNotNull("The ObjectGraph is null", graph);
final EncStatelessHome actual = (EncStatelessHome) graph.getObject();
assertNotNull("The EJBHome returned is null", actual);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class StatelessRmiIiopTests method test42_returnNestedEJBObject.
public void test42_returnNestedEJBObject() {
try {
final Object obj = initialContext.lookup("client/tests/stateless/EncBean");
final EncStatelessHome home = (EncStatelessHome) obj;
assertNotNull("The EJBHome returned from JNDI is null", home);
final EncStatelessObject expected = home.create();
assertNotNull("The EJBObject created is null", expected);
final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
final EncStatelessObject actual = (EncStatelessObject) graph.getObject();
assertNotNull("The EJBObject returned is null", actual);
assertTrue("The EJBObejcts are not identical", expected.isIdentical(actual));
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class StatelessRmiIiopTests method test62_returnNestedColor.
public void test62_returnNestedColor() {
try {
final Color expected = Color.GREEN;
final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
final Color actual = (Color) graph.getObject();
assertNotNull("The Color returned is null", actual);
assertEquals(expected, actual);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class StatelessRmiIiopTests method test37_returnNestedEJBHome.
public void test37_returnNestedEJBHome() {
try {
final Object obj = initialContext.lookup("client/tests/stateless/EncBean");
final EncStatelessHome expected = (EncStatelessHome) obj;
assertNotNull("The EJBHome returned from JNDI is null", expected);
final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
final EncStatelessHome actual = (EncStatelessHome) graph.getObject();
assertNotNull("The EJBHome returned is null", actual);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
Aggregations