use of javax.ejb.EJBHome in project tomee by apache.
the class CmpEjbMetaDataTests method test01_getEJBHome.
// =================================
// Test meta data methods
//
public void test01_getEJBHome() {
try {
final EJBHome home = ejbMetaData.getEJBHome();
assertNotNull("The EJBHome is null", home);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of javax.ejb.EJBHome in project tomee by apache.
the class Unknown2EjbObjectTests method test04_getEjbHome.
public void test04_getEjbHome() {
try {
final EJBHome home = ejbObject.getEJBHome();
assertNotNull("The EJBHome is null", home);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of javax.ejb.EJBHome in project tomee by apache.
the class Unknown2HomeHandleTests method Xtest02_copyHandleByMarshalledObject.
public void Xtest02_copyHandleByMarshalledObject() {
try {
final MarshalledObject obj = new MarshalledObject(ejbHomeHandle);
final HomeHandle copy = (HomeHandle) obj.get();
assertNotNull("The HomeHandle copy is null", copy);
final EJBHome home = copy.getEJBHome();
assertNotNull("The EJBHome is null", home);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of javax.ejb.EJBHome in project tomee by apache.
the class CmpRmiIiopTests method test39_returnEJBHomeArray.
public void test39_returnEJBHomeArray() {
try {
final EncCmpHome[] expected = new EncCmpHome[3];
for (int i = 0; i < expected.length; i++) {
final Object obj = initialContext.lookup("client/tests/entity/cmp/EncBean");
expected[i] = (EncCmpHome) obj;
assertNotNull("The EJBHome returned from JNDI is null", expected[i]);
}
final EJBHome[] actual = ejbObject.returnEJBHomeArray(expected);
assertNotNull("The EJBHome array returned is null", actual);
assertEquals(expected.length, actual.length);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of javax.ejb.EJBHome in project tomee by apache.
the class SingletonRmiIiopTests method test39_returnEJBHomeArray.
public void test39_returnEJBHomeArray() {
try {
final EncSingletonHome[] expected = new EncSingletonHome[3];
for (int i = 0; i < expected.length; i++) {
final Object obj = initialContext.lookup("client/tests/singleton/EncBean");
expected[i] = (EncSingletonHome) obj;
assertNotNull("The EJBHome returned from JNDI is null", expected[i]);
}
final EJBHome[] actual = ejbObject.returnEJBHomeArray(expected);
assertNotNull("The EJBHome array returned is null", actual);
assertEquals(expected.length, actual.length);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
Aggregations