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