EjbObjectProxyHandler handler = new EntityEjbObjectHandler(((RpcContainer) di.getContainer()).getDeploymentInfo(di.getDeploymentID()), threadContext.getPrimaryKey(), InterfaceType.EJB_OBJECT, new ArrayList<Class>());
try {
Class[] interfaces = new Class[]{di.getRemoteInterface(), IntraVmProxy.class};
return (EJBObject) ProxyManager.newProxyInstance(interfaces, handler);
} catch (IllegalAccessException iae) {
throw new InternalErrorException("Could not create IVM proxy for " + di.getRemoteInterface() + " interface", iae);
}
}