1 23 24 28 package com.sun.jts.jtsxa; 29 30 31 37 38 39 public class _OTSResourceStub extends org.omg.CORBA.portable.ObjectImpl implements com.sun.jts.jtsxa.OTSResource 41 { 42 43 public org.omg.CosTransactions.otid_t getGlobalTID () 44 { 45 org.omg.CORBA.portable.InputStream $in = null; 46 try { 47 org.omg.CORBA.portable.OutputStream $out = _request ("getGlobalTID", true); 48 $in = _invoke ($out); 49 org.omg.CosTransactions.otid_t $result = org.omg.CosTransactions.otid_tHelper.read ($in); 50 return $result; 51 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 52 $in = $ex.getInputStream (); 53 String _id = $ex.getId (); 54 throw new org.omg.CORBA.MARSHAL (_id); 55 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 56 return getGlobalTID (); 57 } finally { 58 _releaseReply ($in); 59 } 60 } 62 public org.omg.CosTransactions.Vote prepare () throws org.omg.CosTransactions.HeuristicMixed, org.omg.CosTransactions.HeuristicHazard 63 { 64 org.omg.CORBA.portable.InputStream $in = null; 65 try { 66 org.omg.CORBA.portable.OutputStream $out = _request ("prepare", true); 67 $in = _invoke ($out); 68 org.omg.CosTransactions.Vote $result = org.omg.CosTransactions.VoteHelper.read ($in); 69 return $result; 70 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 71 $in = $ex.getInputStream (); 72 String _id = $ex.getId (); 73 if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicMixed:1.0")) 74 throw org.omg.CosTransactions.HeuristicMixedHelper.read ($in); 75 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicHazard:1.0")) 76 throw org.omg.CosTransactions.HeuristicHazardHelper.read ($in); 77 else 78 throw new org.omg.CORBA.MARSHAL (_id); 79 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 80 return prepare (); 81 } finally { 82 _releaseReply ($in); 83 } 84 } 86 public void rollback () throws org.omg.CosTransactions.HeuristicCommit, org.omg.CosTransactions.HeuristicMixed, org.omg.CosTransactions.HeuristicHazard 87 { 88 org.omg.CORBA.portable.InputStream $in = null; 89 try { 90 org.omg.CORBA.portable.OutputStream $out = _request ("rollback", true); 91 $in = _invoke ($out); 92 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 93 $in = $ex.getInputStream (); 94 String _id = $ex.getId (); 95 if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicCommit:1.0")) 96 throw org.omg.CosTransactions.HeuristicCommitHelper.read ($in); 97 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicMixed:1.0")) 98 throw org.omg.CosTransactions.HeuristicMixedHelper.read ($in); 99 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicHazard:1.0")) 100 throw org.omg.CosTransactions.HeuristicHazardHelper.read ($in); 101 else 102 throw new org.omg.CORBA.MARSHAL (_id); 103 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 104 rollback (); 105 } finally { 106 _releaseReply ($in); 107 } 108 } 110 public void commit () throws org.omg.CosTransactions.NotPrepared, org.omg.CosTransactions.HeuristicRollback, org.omg.CosTransactions.HeuristicMixed, org.omg.CosTransactions.HeuristicHazard 111 { 112 org.omg.CORBA.portable.InputStream $in = null; 113 try { 114 org.omg.CORBA.portable.OutputStream $out = _request ("commit", true); 115 $in = _invoke ($out); 116 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 117 $in = $ex.getInputStream (); 118 String _id = $ex.getId (); 119 if (_id.equals ("IDL:omg.org/CosTransactions/NotPrepared:1.0")) 120 throw org.omg.CosTransactions.NotPreparedHelper.read ($in); 121 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicRollback:1.0")) 122 throw org.omg.CosTransactions.HeuristicRollbackHelper.read ($in); 123 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicMixed:1.0")) 124 throw org.omg.CosTransactions.HeuristicMixedHelper.read ($in); 125 else if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicHazard:1.0")) 126 throw org.omg.CosTransactions.HeuristicHazardHelper.read ($in); 127 else 128 throw new org.omg.CORBA.MARSHAL (_id); 129 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 130 commit (); 131 } finally { 132 _releaseReply ($in); 133 } 134 } 136 public void commit_one_phase () throws org.omg.CosTransactions.HeuristicHazard 137 { 138 org.omg.CORBA.portable.InputStream $in = null; 139 try { 140 org.omg.CORBA.portable.OutputStream $out = _request ("commit_one_phase", true); 141 $in = _invoke ($out); 142 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 143 $in = $ex.getInputStream (); 144 String _id = $ex.getId (); 145 if (_id.equals ("IDL:omg.org/CosTransactions/HeuristicHazard:1.0")) 146 throw org.omg.CosTransactions.HeuristicHazardHelper.read ($in); 147 else 148 throw new org.omg.CORBA.MARSHAL (_id); 149 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 150 commit_one_phase (); 151 } finally { 152 _releaseReply ($in); 153 } 154 } 156 public void forget () 157 { 158 org.omg.CORBA.portable.InputStream $in = null; 159 try { 160 org.omg.CORBA.portable.OutputStream $out = _request ("forget", true); 161 $in = _invoke ($out); 162 } catch (org.omg.CORBA.portable.ApplicationException $ex) { 163 $in = $ex.getInputStream (); 164 String _id = $ex.getId (); 165 throw new org.omg.CORBA.MARSHAL (_id); 166 } catch (org.omg.CORBA.portable.RemarshalException $rm) { 167 forget (); 168 } finally { 169 _releaseReply ($in); 170 } 171 } 173 private static String [] __ids = { 175 "IDL:jtsxa/OTSResource:1.0", 176 "IDL:omg.org/CosTransactions/Resource:1.0"}; 177 178 public String [] _ids () 179 { 180 return (String [])__ids.clone (); 181 } 182 183 private void readObject (java.io.ObjectInputStream s) throws java.io.IOException 184 { 185 String str = s.readUTF (); 186 String [] args = null; 187 java.util.Properties props = null; 188 org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init (args, props).string_to_object (str); 189 org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl ) obj)._get_delegate (); 190 _set_delegate (delegate); 191 } 192 193 private void writeObject (java.io.ObjectOutputStream s) throws java.io.IOException 194 { 195 String [] args = null; 196 java.util.Properties props = null; 197 String str = org.omg.CORBA.ORB.init (args, props).object_to_string (this); 198 s.writeUTF (str); 199 } 200 } | Popular Tags |