javax.ejb.EJBMetaData Java Examples

The following examples show how to use javax.ejb.EJBMetaData. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Cmp2RmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
        final EncCmpHome home = (EncCmpHome) obj;
        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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #2
Source File: CmpRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
        final EncCmpHome home = (EncCmpHome) obj;
        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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #3
Source File: SingletonRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/singleton/EncBean");
        final EncSingletonHome home = (EncSingletonHome) obj;
        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());
    }
}
 
Example #4
Source File: SingletonRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test49_returnEJBMetaDataArray() {
    try {

        final Object obj = initialContext.lookup("client/tests/singleton/EncBean");
        final EncSingletonHome home = (EncSingletonHome) obj;
        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 = (EJBMetaData[]) ejbObject.returnEJBMetaDataArray(expected);
        assertNotNull("The EJBMetaData array returned is null", actual);
        assertEquals(expected.length, actual.length);

        for (int i = 0; i < actual.length; i++) {
            assertNotNull("The EJBMetaData returned is null", actual[i]);
            assertEquals(expected[i].getHomeInterfaceClass(), actual[i].getHomeInterfaceClass());
            assertEquals(expected[i].getRemoteInterfaceClass(), actual[i].getRemoteInterfaceClass());
        }
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #5
Source File: SingletonRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/singleton/EncBean");
        final EncSingletonHome home = (EncSingletonHome) obj;
        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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #6
Source File: StatelessRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test49_returnEJBMetaDataArray() {
    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 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 = (EJBMetaData[]) ejbObject.returnEJBMetaDataArray(expected);
        assertNotNull("The EJBMetaData array returned is null", actual);
        assertEquals(expected.length, actual.length);

        for (int i = 0; i < actual.length; i++) {
            assertNotNull("The EJBMetaData returned is null", actual[i]);
            assertEquals(expected[i].getHomeInterfaceClass(), actual[i].getHomeInterfaceClass());
            assertEquals(expected[i].getRemoteInterfaceClass(), actual[i].getRemoteInterfaceClass());
        }
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #7
Source File: Cmp2RmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test49_returnEJBMetaDataArray() {
    try {

        final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
        final EncCmpHome home = (EncCmpHome) obj;
        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);
        assertEquals(expected.length, actual.length);

        for (int i = 0; i < actual.length; i++) {
            assertNotNull("The EJBMetaData returned is null", actual[i]);
            assertEquals(expected[i].getHomeInterfaceClass(), actual[i].getHomeInterfaceClass());
            assertEquals(expected[i].getRemoteInterfaceClass(), actual[i].getRemoteInterfaceClass());
        }
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #8
Source File: StatefulRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    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 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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #9
Source File: Cmp2RmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
        final EncCmpHome home = (EncCmpHome) obj;
        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());
    }
}
 
Example #10
Source File: CmpRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
        final EncCmpHome home = (EncCmpHome) obj;
        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());
    }
}
 
Example #11
Source File: StatefulRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    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 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());
    }
}
 
Example #12
Source File: StatelessRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    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 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());
    }
}
 
Example #13
Source File: BmpRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test49_returnEJBMetaDataArray() {
    try {

        final Object obj = initialContext.lookup("client/tests/entity/bmp/EncBean");
        final EncBmpHome home = (EncBmpHome) obj;
        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 = (EJBMetaData[]) ejbObject.returnEJBMetaDataArray(expected);
        assertNotNull("The EJBMetaData array returned is null", actual);
        assertEquals(expected.length, actual.length);

        for (int i = 0; i < actual.length; i++) {
            assertNotNull("The EJBMetaData returned is null", actual[i]);
            assertEquals(expected[i].getHomeInterfaceClass(), actual[i].getHomeInterfaceClass());
            assertEquals(expected[i].getRemoteInterfaceClass(), actual[i].getRemoteInterfaceClass());
        }
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #14
Source File: BmpRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test47_returnNestedEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/bmp/EncBean");
        final EncBmpHome home = (EncBmpHome) obj;
        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());
    }
}
 
Example #15
Source File: StatelessRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    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 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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #16
Source File: BmpRmiIiopTests.java    From tomee with Apache License 2.0 6 votes vote down vote up
public void test45_returnEJBMetaData() {
    try {
        final Object obj = initialContext.lookup("client/tests/entity/bmp/EncBean");
        final EncBmpHome home = (EncBmpHome) obj;
        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());
        assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #17
Source File: RmiIiopBmpBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException {
    EJBMetaData data = null;

    try {
        final InitialContext ctx = new InitialContext();

        final EncBmpHome home = (EncBmpHome) ctx.lookup("java:comp/env/bmp/rmi-iiop/home");
        data = home.getEJBMetaData();

    } catch (final Exception e) {
        throw new javax.ejb.EJBException(e);
    }
    return data;
}
 
Example #18
Source File: RmiIiopCmp2Bean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public ObjectGraph returnNestedEJBMetaData() {
    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 EJBException(e);
    }
    return data;
}
 
Example #19
Source File: SingletonRmiIiopTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
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());
    }
}
 
Example #20
Source File: RmiIiopCmpBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
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;
}
 
Example #21
Source File: RmiIiopSingletonBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException {
    EJBMetaData data = null;

    try {
        final InitialContext ctx = new InitialContext();

        final EncSingletonHome home = (EncSingletonHome) ctx.lookup("java:comp/env/singleton/rmi-iiop/home");
        data = home.getEJBMetaData();

    } catch (final Exception e) {
        throw new javax.ejb.EJBException(e);
    }
    return data;
}
 
Example #22
Source File: SingletonPojoEjbHomeTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
public void test01_getEJBMetaData() {
    try {
        final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
        assertNotNull("EJBMetaData is null", ejbMetaData);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #23
Source File: SingletonEjbHomeTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
public void test01_getEJBMetaData() {
    try {
        final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
        assertNotNull("EJBMetaData is null", ejbMetaData);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #24
Source File: RmiIiopBmpBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public ObjectGraph returnNestedEJBMetaData() throws javax.ejb.EJBException {
    ObjectGraph data = null;

    try {
        final InitialContext ctx = new InitialContext();

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

    } catch (final Exception e) {
        throw new javax.ejb.EJBException(e);
    }
    return data;
}
 
Example #25
Source File: RmiIiopCmp2Bean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public EJBMetaData returnEJBMetaData() {
    EJBMetaData data = null;

    try {
        final InitialContext ctx = new InitialContext();

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

    } catch (final Exception e) {
        throw new EJBException(e);
    }
    return data;
}
 
Example #26
Source File: RmiIiopStatefulBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException {
    EJBMetaData data = null;

    try {
        final InitialContext ctx = new InitialContext();

        final EncStatefulHome home = (EncStatefulHome) ctx.lookup("java:comp/env/stateful/rmi-iiop/home");
        data = home.getEJBMetaData();

    } catch (final Exception e) {
        throw new javax.ejb.EJBException(e);
    }
    return data;
}
 
Example #27
Source File: RmiIiopSingletonBean.java    From tomee with Apache License 2.0 5 votes vote down vote up
public ObjectGraph returnNestedEJBMetaData() throws javax.ejb.EJBException {
    ObjectGraph data = null;

    try {
        final InitialContext ctx = new InitialContext();

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

    } catch (final Exception e) {
        throw new javax.ejb.EJBException(e);
    }
    return data;
}
 
Example #28
Source File: StatelessRmiIiopTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
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());
    }
}
 
Example #29
Source File: StatelessRmiIiopTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
public void test46_returnEJBMetaData() {
    try {
        final EJBMetaData actual = ejbObject.returnEJBMetaData();
        assertNotNull("The EJBMetaData returned is null", actual);
        assertEquals(actual.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
        assertEquals(actual.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
 
Example #30
Source File: StatelessPojoEjbHomeTests.java    From tomee with Apache License 2.0 5 votes vote down vote up
public void test01_getEJBMetaData() {
    try {
        final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
        assertNotNull("EJBMetaData is null", ejbMetaData);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}