use of javax.ejb.EJBHome in project tomee by apache.
the class Unknown2HomeHandleTests method test01_getEJBHome.
// =================================
// Test home handle methods
//
public void test01_getEJBHome() {
try {
final EJBHome home = ejbHomeHandle.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 Xtest03_copyHandleBySerialize.
public void Xtest03_copyHandleBySerialize() {
try {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
oos.writeObject(ejbHomeHandle);
oos.flush();
oos.close();
final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
final ObjectInputStream ois = new ObjectInputStream(bais);
final HomeHandle copy = (HomeHandle) ois.readObject();
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 RmiIiopStatelessBean method returnEJBHome.
public EJBHome returnEJBHome() throws javax.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 javax.ejb.EJBException(e);
}
return data;
}
use of javax.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 javax.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