Search in sources :

Example 16 with EJBMetaData

use of javax.ejb.EJBMetaData in project tomee by apache.

the class Complex2EjbHomeTests method test01_getEJBMetaData.

//===============================
// Test ejb home methods
//
public void test01_getEJBMetaData() {
    try {
        final EJBMetaData ejbMetaData = ejbHome.getEJBMetaData();
        assertNotNull("The EJBMetaData is null", ejbMetaData);
    } catch (final Exception e) {
        fail("Received Exception " + e.getClass() + " : " + e.getMessage());
    }
}
Also used : EJBMetaData(javax.ejb.EJBMetaData) ObjectNotFoundException(javax.ejb.ObjectNotFoundException)

Example 17 with EJBMetaData

use of javax.ejb.EJBMetaData in project tomee by apache.

the class RmiIiopCmp2Bean method returnNestedEJBMetaData.

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;
}
Also used : EJBMetaData(javax.ejb.EJBMetaData) ObjectGraph(org.apache.openejb.test.object.ObjectGraph) EJBException(javax.ejb.EJBException) InitialContext(javax.naming.InitialContext) EJBException(javax.ejb.EJBException) CreateException(javax.ejb.CreateException)

Example 18 with EJBMetaData

use of javax.ejb.EJBMetaData in project tomee by apache.

the class RmiIiopCmp2Bean method returnEJBMetaData.

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;
}
Also used : EJBMetaData(javax.ejb.EJBMetaData) EJBException(javax.ejb.EJBException) InitialContext(javax.naming.InitialContext) EJBException(javax.ejb.EJBException) CreateException(javax.ejb.CreateException)

Example 19 with EJBMetaData

use of javax.ejb.EJBMetaData in project tomee by apache.

the class RmiIiopCmpBean method returnNestedEJBMetaData.

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;
}
Also used : EJBMetaData(javax.ejb.EJBMetaData) EJBException(javax.ejb.EJBException) ObjectGraph(org.apache.openejb.test.object.ObjectGraph) InitialContext(javax.naming.InitialContext) EJBException(javax.ejb.EJBException) RemoveException(javax.ejb.RemoveException) RemoteException(java.rmi.RemoteException)

Example 20 with EJBMetaData

use of javax.ejb.EJBMetaData in project tomee by apache.

the class RmiIiopBmpBean method returnEJBMetaData.

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;
}
Also used : EJBMetaData(javax.ejb.EJBMetaData) EJBException(javax.ejb.EJBException) InitialContext(javax.naming.InitialContext) EJBException(javax.ejb.EJBException) RemoveException(javax.ejb.RemoveException) RemoteException(java.rmi.RemoteException)

Aggregations

EJBMetaData (javax.ejb.EJBMetaData)59 RemoteException (java.rmi.RemoteException)40 EJBObject (javax.ejb.EJBObject)20 ObjectGraph (org.apache.openejb.test.object.ObjectGraph)18 InitialContext (javax.naming.InitialContext)14 EJBException (javax.ejb.EJBException)12 RemoveException (javax.ejb.RemoveException)10 ObjectNotFoundException (javax.ejb.ObjectNotFoundException)7 Handle (javax.ejb.Handle)3 HomeHandle (javax.ejb.HomeHandle)3 EncCmpHome (org.apache.openejb.test.entity.cmp.EncCmpHome)3 EncCmpObject (org.apache.openejb.test.entity.cmp.EncCmpObject)3 RmiIiopCmpObject (org.apache.openejb.test.entity.cmp.RmiIiopCmpObject)3 CreateException (javax.ejb.CreateException)2 EJBHome (javax.ejb.EJBHome)2 Test (org.junit.Test)2 List (java.util.List)1 Session30 (org.jboss.as.test.integration.ejb.ejb2.reference.global.Session30)1