use of jakarta.ejb.EJBHome in project tomee by apache.
the class RmiIiopCmpBean method returnEJBHome.
public EJBHome returnEJBHome() throws jakarta.ejb.EJBException {
EJBHome data = null;
try {
final InitialContext ctx = new InitialContext();
data = (EJBHome) ctx.lookup("java:comp/env/cmp/rmi-iiop/home");
} catch (final Exception e) {
e.printStackTrace();
throw new jakarta.ejb.EJBException(e);
}
return data;
}
use of jakarta.ejb.EJBHome in project tomee by apache.
the class RmiIiopStatelessBean method returnEJBHome.
public EJBHome returnEJBHome() throws jakarta.ejb.EJBException {
EJBHome data = null;
try {
final InitialContext ctx = new InitialContext();
data = (EJBHome) ctx.lookup("java:comp/env/stateless/rmi-iiop/home");
} catch (final Exception e) {
e.printStackTrace();
throw new jakarta.ejb.EJBException(e);
}
return data;
}
use of jakarta.ejb.EJBHome in project tomee by apache.
the class BmpRmiIiopTests method test39_returnEJBHomeArray.
public void test39_returnEJBHomeArray() {
try {
final EncBmpHome[] expected = new EncBmpHome[3];
for (int i = 0; i < expected.length; i++) {
final Object obj = initialContext.lookup("client/tests/entity/bmp/EncBean");
expected[i] = (EncBmpHome) 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 jakarta.ejb.EJBHome in project tomee by apache.
the class BmpEjbMetaDataTests 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 jakarta.ejb.EJBHome in project tomee by apache.
the class BmpEjbObjectTests 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());
}
}
Aggregations