KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jotm > _RecoveryCoordinator_Stub


1 // Stub class generated by rmic, do not edit.
2
// Contents subject to change without notice.
3

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