use of javax.ejb.EJBMetaData in project tomee by apache.
the class ComplexEjbHomeTests 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());
}
}
use of javax.ejb.EJBMetaData in project tomee by apache.
the class BmpEjbHomeTests 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());
}
}
use of javax.ejb.EJBMetaData in project tomee by apache.
the class BmpRmiIiopTests method test48_returnNestedEJBMetaData2.
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());
}
}
use of javax.ejb.EJBMetaData in project tomee by apache.
the class BmpRmiIiopTests method test49_returnEJBMetaDataArray.
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());
}
}
use of javax.ejb.EJBMetaData in project tomee by apache.
the class RmiIiopCmpBean method returnEJBMetaData.
public EJBMetaData returnEJBMetaData() throws javax.ejb.EJBException {
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 javax.ejb.EJBException(e);
}
return data;
}
Aggregations