use of javax.ejb.EJBLocalHome in project Payara by payara.
the class SafeProperties method instantiateEJBLocalHomeImpl.
private EJBLocalHomeImpl instantiateEJBLocalHomeImpl() throws Exception {
// LocalHome impl
EJBLocalHomeInvocationHandler invHandler = getEJBLocalHomeInvocationHandler(localHomeIntf);
invHandler.setMethodMap(proxyInvocationInfoMap);
EJBLocalHomeImpl homeImpl = invHandler;
// Maintain insertion order
Set proxyInterfacesSet = new LinkedHashSet();
proxyInterfacesSet.add(IndirectlySerializable.class);
addProxyInterfacesSetClass(proxyInterfacesSet, true);
proxyInterfacesSet.add(localHomeIntf);
Class[] proxyInterfaces = (Class[]) proxyInterfacesSet.toArray(new Class[proxyInterfacesSet.size()]);
// Client's EJBLocalHome object
try {
EJBLocalHome proxy = (EJBLocalHome) Proxy.newProxyInstance(loader, proxyInterfaces, invHandler);
invHandler.setProxy(proxy);
} catch (ClassCastException e) {
String msg = localStrings.getLocalString("ejb.basecontainer_invalid_local_home_interface", "Local home interface [{0}] is invalid since it does not extend javax.ejb.EJBLocalHome.", localHomeIntf);
throw new IllegalArgumentException(msg, e);
}
homeImpl.setContainer(this);
return homeImpl;
}
use of javax.ejb.EJBLocalHome in project tomee by apache.
the class StatelessPojoEjbLocalObjectTests method test02_getEjbLocalHome.
public void test02_getEjbLocalHome() {
try {
final EJBLocalHome localHome = ejbLocalObject.getEJBLocalHome();
assertNotNull("The EJBLocalHome is null", localHome);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
use of javax.ejb.EJBLocalHome in project Payara by payara.
the class SafeProperties method instantiateEJBLocalBusinessHomeImpl.
private EJBLocalHomeImpl instantiateEJBLocalBusinessHomeImpl() throws Exception {
EJBLocalHomeInvocationHandler invHandler = getEJBLocalHomeInvocationHandler(localBusinessHomeIntf);
invHandler.setMethodMap(proxyInvocationInfoMap);
EJBLocalHomeImpl homeImpl = invHandler;
EJBLocalHome proxy = (EJBLocalHome) Proxy.newProxyInstance(loader, new Class[] { IndirectlySerializable.class, localBusinessHomeIntf }, invHandler);
invHandler.setProxy(proxy);
homeImpl.setContainer(this);
return homeImpl;
}
use of javax.ejb.EJBLocalHome in project Payara by payara.
the class SafeProperties method instantiateEJBOptionalLocalBusinessHomeImpl.
private EJBLocalHomeImpl instantiateEJBOptionalLocalBusinessHomeImpl() throws Exception {
EJBLocalHomeInvocationHandler invHandler = getEJBLocalHomeInvocationHandler(localBusinessHomeIntf);
invHandler.setMethodMap(proxyInvocationInfoMap);
EJBLocalHomeImpl homeImpl = invHandler;
EJBLocalHome proxy = (EJBLocalHome) Proxy.newProxyInstance(loader, new Class[] { IndirectlySerializable.class, ejbOptionalLocalBusinessHomeIntf }, invHandler);
invHandler.setProxy(proxy);
homeImpl.setContainer(this);
return homeImpl;
}
use of javax.ejb.EJBLocalHome in project tomee by apache.
the class SingletonPojoEjbLocalObjectTests method test02_getEjbLocalHome.
public void test02_getEjbLocalHome() {
try {
final EJBLocalHome localHome = ejbLocalObject.getEJBLocalHome();
assertNotNull("The EJBLocalHome is null", localHome);
} catch (final Exception e) {
fail("Received Exception " + e.getClass() + " : " + e.getMessage());
}
}
Aggregations