Examples of ObjectGraph


Examples of org.apache.openejb.test.object.ObjectGraph

        }
        return data;
    }

    public ObjectGraph returnNestedEJBHome() throws javax.ejb.EJBException {
        ObjectGraph data = null;

        try {
            final InitialContext ctx = new InitialContext();

            final Object object = ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
            data = new ObjectGraph(object);

        } catch (final Exception e) {
            throw new javax.ejb.EJBException(e);
        }
        return data;
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
        return data;
    }

    public ObjectGraph returnNestedEJBObject() throws javax.ejb.EJBException {
        ObjectGraph data = null;

        try {
            final InitialContext ctx = new InitialContext();

            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
            final EncCmpObject object = home.create("Test02 CmpBean");
            data = new ObjectGraph(object);

        } catch (final Exception e) {
            throw new javax.ejb.EJBException(e);
        }
        return data;
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
        return data;
    }

    public ObjectGraph returnNestedEJBMetaData() throws javax.ejb.EJBException {
        ObjectGraph data = null;

        try {
            final InitialContext ctx = new InitialContext();

            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
            final EJBMetaData object = home.getEJBMetaData();
            data = new ObjectGraph(object);

        } catch (final Exception e) {
            throw new javax.ejb.EJBException(e);
        }
        return data;
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
        return data;
    }

    public ObjectGraph returnNestedHandle() throws javax.ejb.EJBException {
        ObjectGraph data = null;

        try {
            final InitialContext ctx = new InitialContext();

            final EncCmpHome home = (EncCmpHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
            final EncCmpObject object = home.create("Test04 CmpBean");
            data = new ObjectGraph(object.getHandle());

        } catch (final Exception e) {
            throw new javax.ejb.EJBException(e);
        }
        return data;
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        try{
            final Object obj = initialContext.lookup("client/tests/entity/bmp/EncBean");
            final EncBmpHome expected = (EncBmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncBmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", expected);

            final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            final EncBmpHome actual = (EncBmpHome)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncBmpHome.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
    }

    public void test38_returnNestedEJBHome2() {
        try{
            final ObjectGraph graph = ejbObject.returnNestedEJBHome();
            assertNotNull("The ObjectGraph is null", graph);

            final EncBmpHome actual = (EncBmpHome)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncBmpHome.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

            assertNotNull("The EJBHome returned from JNDI is null", home);

            final EncBmpObject expected = home.create("test_42 BmpBean");
            assertNotNull("The EJBObject created is null", expected);

            final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            final EncBmpObject actual = (EncBmpObject)(EncBmpObject)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncBmpObject.class);
            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());
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
    }

    public void test43_returnNestedEJBObject2() {
        try{
            final ObjectGraph graph = ejbObject.returnNestedEJBObject();
            assertNotNull("The ObjectGraph is null", graph);

            final EncBmpObject actual = (EncBmpObject)(EncBmpObject)javax.rmi.PortableRemoteObject.narrow( graph.getObject(), EncBmpObject.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

            assertNotNull("The EJBHome returned from JNDI is null", home);

            final EJBMetaData expected = home.getEJBMetaData();
            assertNotNull("The EJBMetaData returned is null", expected);

            final ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
            assertNotNull("The ObjectGraph is null", graph);

            final EJBMetaData actual = (EJBMetaData)graph.getObject();
            assertNotNull("The EJBMetaData returned is null", actual);
            assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
            assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
        } catch (final Exception e){
            fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
View Full Code Here

Examples of org.apache.openejb.test.object.ObjectGraph

        }
    }

    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());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.