1 4 package org.objectweb.jotm; 5 6 import java.io.Serializable ; 7 import java.rmi.Remote ; 8 import java.rmi.RemoteException ; 9 import java.rmi.UnexpectedException ; 10 import javax.rmi.CORBA.Stub ; 11 import javax.rmi.CORBA.Util ; 12 import javax.rmi.PortableRemoteObject ; 13 import org.omg.CORBA.ORB ; 14 import org.omg.CORBA.SystemException ; 15 import org.omg.CORBA.portable.ApplicationException ; 16 import org.omg.CORBA.portable.InputStream ; 17 import org.omg.CORBA.portable.OutputStream ; 18 import org.omg.CORBA.portable.RemarshalException ; 19 import org.omg.CORBA.portable.ResponseHandler ; 20 import org.omg.CORBA.portable.ServantObject ; 21 22 23 public class _RecoveryCoordinator_Stub extends Stub implements RecoveryCoordinator { 24 25 private static final String [] _type_ids = { 26 "RMI:org.objectweb.jotm.RecoveryCoordinator:0000000000000000" 27 }; 28 29 public String [] _ids() { 30 return _type_ids; 31 } 32 33 public int replay_completion(Resource arg0) throws RemoteException { 34 if (!Util.isLocal(this)) { 35 try { 36 org.omg.CORBA.portable.InputStream in = null; 37 try { 38 OutputStream out = _request("replay_completion", true); 39 Util.writeRemoteObject(out,arg0); 40 in = _invoke(out); 41 return in.read_long(); 42 } catch (ApplicationException ex) { 43 in = ex.getInputStream(); 44 String id = in.read_string(); 45 throw new UnexpectedException (id); 46 } catch (RemarshalException ex) { 47 return replay_completion(arg0); 48 } finally { 49 _releaseReply(in); 50 } 51 } catch (SystemException ex) { 52 throw Util.mapSystemException(ex); 53 } 54 } else { 55 ServantObject so = _servant_preinvoke("replay_completion",RecoveryCoordinator.class); 56 if (so == null) { 57 return replay_completion(arg0); 58 } 59 try { 60 Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb()); 61 return ((RecoveryCoordinator)so.servant).replay_completion(arg0Copy); 62 } catch (Throwable ex) { 63 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 64 throw Util.wrapException(exCopy); 65 } finally { 66 _servant_postinvoke(so); 67 } 68 } 69 } 70 } 71 | Popular Tags |