@Override public Object invoke( final EJBInvocationHandler thisHandler, final Object proxy, final Method method, final Object[] args) throws Exception { final EJBLocator locator = (EJBLocator) thisHandler.getLocator(); return new EJBHandle(locator); }
@Override public Object invoke( final EJBInvocationHandler thisHandler, final Object proxy, final Method method, final Object[] args) throws Exception { final EJBLocator locator = (EJBLocator) thisHandler.getLocator(); if (locator instanceof EJBHomeLocator) { return new EJBHomeHandle((EJBHomeLocator) locator); } throw new RemoteException("Cannot invoke getHomeHandle() on " + proxy); }