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

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


    }

    public void test42_returnNestedEJBObject() {
        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_42 CmpBean");
            assertNotNull("The EJBObject created is null", expected);

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


    }

    public void Xtest44_returnEJBObjectArray() {
        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 = new EncCmpObject[3];
            for (int i = 0; i < expected.length; i++) {
                expected[i] = home.create("test_44 CmpBean");
                assertNotNull("The EJBObject created is null", expected[i]);
            }

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

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

    public void test45_returnEJBMetaData() {
        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 EJBMetaData expected = home.getEJBMetaData();
            assertNotNull("The EJBMetaData returned is null", expected);

            final EJBMetaData actual = ejbObject.returnEJBMetaData(expected);
            assertNotNull("The EJBMetaData returned is null", actual);
            assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
View Full Code Here

    }

    public void test47_returnNestedEJBMetaData() {
        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 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);
View Full Code Here

    public void test49_returnEJBMetaDataArray() {
        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 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]);
            }

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

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

    public void test50_returnHandle() {
        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 object = home.create("test_50 CmpBean");
            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());
View Full Code Here

    }

    public void test52_returnNestedHandle() {
        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 object = home.create("test_52 CmpBean");
            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());
View Full Code Here

    }

    public void test54_returnHandleArray() {
        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 object = home.create("test_54 CmpBean");
            assertNotNull("The EJBObject created is null", object);

            final 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 {
            Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
            EncCmpHome expected = (EncCmpHome) javax.rmi.PortableRemoteObject.narrow(obj, EncCmpHome.class);
            assertNotNull("The EJBHome returned from JNDI is null", expected);

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

        } catch (Exception e) {
            fail("Received Exception " + e.getClass() + " : " + e.getMessage());
        }
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.