Package org.apache.openejb.test.entity.cmp

Examples of org.apache.openejb.test.entity.cmp.EncCmpHome


    public void test49_returnEJBMetaDataArray() {
        try {

            Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", home);

            EJBMetaData expected[] = new EJBMetaData[3];
            for (int i = 0; i < expected.length; i++) {
                expected[i] = home.getEJBMetaData();
                assertNotNull("The EJBMetaData returned is null", expected[i]);
            }

            EJBMetaData[] actual = ejbObject.returnEJBMetaDataArray(expected);
            assertNotNull("The EJBMetaData array returned is null", actual);
View Full Code Here


/*-------------------------------------------------*/

    public void test50_returnHandle() {
        try {
            Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", home);

            EncCmpObject object = home.create("test_50 CmpBean");
            assertNotNull("The EJBObject created is null", object);

            Handle expected = object.getHandle();
            assertNotNull("The EJBObject Handle returned is null", expected);
            assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());
View Full Code Here

    }

    public void test52_returnNestedHandle() {
        try {
            Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", home);

            EncCmpObject object = home.create("test_52 CmpBean");
            assertNotNull("The EJBObject created is null", object);

            Handle expected = object.getHandle();
            assertNotNull("The EJBObject Handle returned is null", expected);
            assertNotNull("The EJBObject in the Handle is null", expected.getEJBObject());
View Full Code Here

    }

    public void test54_returnHandleArray() {
        try {
            Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", home);

            EncCmpObject object = home.create("test_54 CmpBean");
            assertNotNull("The EJBObject created is null", object);

            Handle expected[] = new Handle[3];
            for (int i = 0; i < expected.length; i++) {
                expected[i] = object.getHandle();
View Full Code Here

     * DMB: Calling this now causes an error as the "entity" table doesn't exist yet
     */
    public void _test04_isIdentical_cmp(){
        try{
            final String jndiName = "client/tests/entity/cmp/EncBean";
            EncCmpHome ejbHome2 = null;
            EncCmpObject ejbObject2 = null;

            final Object obj = initialContext.lookup(jndiName);
            ejbHome2 = (EncCmpHome)javax.rmi.PortableRemoteObject.narrow( obj, EncCmpHome.class);
            ejbObject2 = ejbHome2.create("isIdentical test");

            //System.out.println("_______________________________________________________");
            //System.out.println(" ejb1 "+ejbObject);
            //System.out.println(" ejb2 "+ejbObject2);
            assertTrue( "The EJBObjects should not be identical", !ejbObject.isIdentical(ejbObject2) );
View Full Code Here

/*-------------------------------------------------*/

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

            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(expected), EncCmpHome.class);
            assertNotNull("The EJBHome returned is null", actual);

        } catch (final Exception e) {
            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
View Full Code Here

        }
    }

    public void test36_returnEJBHome2() {
        try {
            final EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBHome(), EncCmpHome.class);
            assertNotNull("The EJBHome returned is null", actual);

        } catch (final Exception e) {
            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
View Full Code Here

    }

    public void test37_returnNestedEJBHome() {
        try {
            final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            final EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.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 EncCmpHome actual = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(graph.getObject(), EncCmpHome.class);
            assertNotNull("The EJBHome returned is null", actual);
        } catch (final Exception e) {
            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
    }
View Full Code Here

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

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

/*-------------------------------------------------*/

    public void test40_returnEJBObject() {
        try {
            final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            final EncCmpHome home = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", home);

            final EncCmpObject expected = home.create("test_40 CmpBean");
            assertNotNull("The EJBObject created is null", expected);

            final EncCmpObject actual = (EncCmpObject) javax.rmi.PortableRemoteObject.narrow(ejbObject.returnEJBObject(expected), EncCmpObject.class);
            assertNotNull("The EJBObject returned is null", actual);

View Full Code Here

TOP

Related Classes of org.apache.openejb.test.entity.cmp.EncCmpHome

Copyright © 2018 www.massapicom. 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.