use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class CmpRmiIiopTests method test53_returnNestedHandle2.
public void test53_returnNestedHandle2() {
try {
final ObjectGraph graph = ejbObject.returnNestedHandle();
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());
} 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 CmpRmiIiopTests method test37_returnNestedEJBHome.
public void test37_returnNestedEJBHome() {
try {
final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
final EncCmpHome expected = (EncCmpHome) 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 EncCmpHome actual = (EncCmpHome) 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 BmpRmiIiopTests method test48_returnNestedEJBMetaData2.
public void test48_returnNestedEJBMetaData2() {
try {
final ObjectGraph graph = ejbObject.returnNestedEJBMetaData();
assertNotNull("The ObjectGraph is null", graph);
final EJBMetaData actual = (EJBMetaData) graph.getObject();
assertNotNull("The EJBMetaData returned is null", actual);
assertNotNull("The home interface class of the EJBMetaData is null", actual.getHomeInterfaceClass());
assertNotNull("The remote interface class of the EJBMetaData is null", actual.getRemoteInterfaceClass());
} 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 RmiIiopStatelessBean method returnNestedHandle.
public ObjectGraph returnNestedHandle() throws javax.ejb.EJBException {
ObjectGraph data = null;
try {
final InitialContext ctx = new InitialContext();
final EncStatelessHome home = (EncStatelessHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
final EncStatelessObject object = home.create();
data = new ObjectGraph(object.getHandle());
} catch (final Exception e) {
throw new javax.ejb.EJBException(e);
}
return data;
}
use of org.apache.openejb.test.object.ObjectGraph in project tomee by apache.
the class RmiIiopStatelessBean method returnNestedEJBHome.
public ObjectGraph returnNestedEJBHome() throws javax.ejb.EJBException {
ObjectGraph data = null;
try {
final InitialContext ctx = new InitialContext();
final Object object = ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
data = new ObjectGraph(object);
} catch (final Exception e) {
throw new javax.ejb.EJBException(e);
}
return data;
}
Aggregations