public Object copy(Object obj) { if (obj instanceof Remote) { // Yes, so make sure it is connected and converted // to a stub (if needed)... return Utility.autoConnect(obj, orb, true); } OutputStream out = (OutputStream) orb.create_output_stream(); out.write_value((Serializable) obj); InputStream in = (InputStream) out.create_input_stream(); return in.read_value(); }
public Revokedconsent findByPrimaryKey(RevokedconsentKey arg0) throws RemoteException, FinderException { while (true) { if (!Util.isLocal(this)) { InputStream in = null; try { try { org.omg.CORBA_2_3.portable.OutputStream out = (org.omg.CORBA_2_3.portable.OutputStream) _request("findByPrimaryKey", true); out.write_value(arg0, RevokedconsentKey.class); in = (InputStream) _invoke(out); return (Revokedconsent) in.read_Object(Revokedconsent.class); } catch (ApplicationException ex) { in = (InputStream) ex.getInputStream(); String id = in.read_string(); if (id.equals("IDL:javax/ejb/FinderEx:1.0")) { throw (FinderException) in.read_value(FinderException.class); } throw new UnexpectedException(id); } catch (RemarshalException ex) { continue; } } catch (SystemException ex) { throw Util.mapSystemException(ex); } finally { _releaseReply(in); } } else { ServantObject so = _servant_preinvoke( "findByPrimaryKey", com.ardais.bigr.iltds.beans.RevokedconsentHome.class); if (so == null) { continue; } try { RevokedconsentKey arg0Copy = (RevokedconsentKey) Util.copyObject(arg0, _orb()); Revokedconsent result = ((com.ardais.bigr.iltds.beans.RevokedconsentHome) so.servant) .findByPrimaryKey(arg0Copy); return (Revokedconsent) Util.copyObject(result, _orb()); } catch (Throwable ex) { Throwable exCopy = (Throwable) Util.copyObject(ex, _orb()); if (exCopy instanceof FinderException) { throw (FinderException) exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } }
public void remove(Object arg0) throws RemoteException, RemoveException { while (true) { if (!Util.isLocal(this)) { InputStream in = null; try { try { OutputStream out = _request("remove__java_lang_Object", true); Util.writeAny(out, arg0); _invoke(out); return; } catch (ApplicationException ex) { in = (InputStream) ex.getInputStream(); String id = in.read_string(); if (id.equals("IDL:javax/ejb/RemoveEx:1.0")) { throw (RemoveException) in.read_value(RemoveException.class); } throw new UnexpectedException(id); } catch (RemarshalException ex) { continue; } } catch (SystemException ex) { throw Util.mapSystemException(ex); } finally { _releaseReply(in); } } else { ServantObject so = _servant_preinvoke("remove__java_lang_Object", javax.ejb.EJBHome.class); if (so == null) { continue; } try { Object arg0Copy = (Object) Util.copyObject(arg0, _orb()); ((javax.ejb.EJBHome) so.servant).remove(arg0Copy); return; } catch (Throwable ex) { Throwable exCopy = (Throwable) Util.copyObject(ex, _orb()); if (exCopy instanceof RemoveException) { throw (RemoveException) exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } }
public PtsOperation create() throws CreateException, RemoteException { while (true) { if (!Util.isLocal(this)) { InputStream in = null; try { try { OutputStream out = _request("create", true); in = (InputStream) _invoke(out); return (PtsOperation) in.read_Object(PtsOperation.class); } catch (ApplicationException ex) { in = (InputStream) ex.getInputStream(); String id = in.read_string(); if (id.equals("IDL:javax/ejb/CreateEx:1.0")) { throw (CreateException) in.read_value(CreateException.class); } throw new UnexpectedException(id); } catch (RemarshalException ex) { continue; } } catch (SystemException ex) { throw Util.mapSystemException(ex); } finally { _releaseReply(in); } } else { ServantObject so = _servant_preinvoke("create", com.ardais.bigr.iltds.beans.PtsOperationHome.class); if (so == null) { continue; } try { PtsOperation result = ((com.ardais.bigr.iltds.beans.PtsOperationHome) so.servant).create(); return (PtsOperation) Util.copyObject(result, _orb()); } catch (Throwable ex) { Throwable exCopy = (Throwable) Util.copyObject(ex, _orb()); if (exCopy instanceof CreateException) { throw (CreateException) exCopy; } throw Util.wrapException(exCopy); } finally { _servant_postinvoke(so); } } } }
public IORTemplateImpl(InputStream is) { ORB orb = (ORB) (is.orb()); IdentifiableFactoryFinder finder = orb.getTaggedProfileTemplateFactoryFinder(); oktemp = orb.getObjectKeyFactory().createTemplate(is); EncapsulationUtility.readIdentifiableSequence(this, finder, is); makeImmutable(); }
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); } } } }
@Override public Serializable read_value(InputStream inputStream) { return inputStream.read_value(new NestedValueImpl()); }
public IIOPAddressImpl(InputStream is) { host = is.read_string(); short thePort = is.read_short(); port = shortToInt(thePort); }