Пример #1
0
 public HomeHandle getHomeHandle() throws RemoteException {
   while (true) {
     if (!Util.isLocal(this)) {
       InputStream in = null;
       try {
         try {
           OutputStream out = _request("_get_homeHandle", true);
           in = (InputStream) _invoke(out);
           return (HomeHandle) in.read_abstract_interface(HomeHandle.class);
         } catch (ApplicationException ex) {
           in = (InputStream) ex.getInputStream();
           String id = in.read_string();
           throw new UnexpectedException(id);
         } catch (RemarshalException ex) {
           continue;
         }
       } catch (SystemException ex) {
         throw Util.mapSystemException(ex);
       } finally {
         _releaseReply(in);
       }
     } else {
       ServantObject so = _servant_preinvoke("_get_homeHandle", javax.ejb.EJBHome.class);
       if (so == null) {
         continue;
       }
       try {
         HomeHandle result = ((javax.ejb.EJBHome) so.servant).getHomeHandle();
         return (HomeHandle) Util.copyObject(result, _orb());
       } catch (Throwable ex) {
         Throwable exCopy = (Throwable) Util.copyObject(ex, _orb());
         throw Util.wrapException(exCopy);
       } finally {
         _servant_postinvoke(so);
       }
     }
   }
 }