1 23 24 28 package com.sun.jts.otsidl; 29 30 31 37 38 39 public abstract class JCoordinatorPOA extends org.omg.PortableServer.Servant 41 implements com.sun.jts.otsidl.JCoordinatorOperations, org.omg.CORBA.portable.InvokeHandler 42 { 43 44 46 private static java.util.Hashtable _methods = new java.util.Hashtable (); 47 static 48 { 49 _methods.put ("getGlobalTID", new java.lang.Integer (0)); 50 _methods.put ("getLocalTID", new java.lang.Integer (1)); 51 _methods.put ("getAncestors", new java.lang.Integer (2)); 52 _methods.put ("isRollbackOnly", new java.lang.Integer (3)); 53 _methods.put ("get_status", new java.lang.Integer (4)); 54 _methods.put ("get_parent_status", new java.lang.Integer (5)); 55 _methods.put ("get_top_level_status", new java.lang.Integer (6)); 56 _methods.put ("is_same_transaction", new java.lang.Integer (7)); 57 _methods.put ("is_related_transaction", new java.lang.Integer (8)); 58 _methods.put ("is_ancestor_transaction", new java.lang.Integer (9)); 59 _methods.put ("is_descendant_transaction", new java.lang.Integer (10)); 60 _methods.put ("is_top_level_transaction", new java.lang.Integer (11)); 61 _methods.put ("hash_transaction", new java.lang.Integer (12)); 62 _methods.put ("hash_top_level_tran", new java.lang.Integer (13)); 63 _methods.put ("register_resource", new java.lang.Integer (14)); 64 _methods.put ("register_synchronization", new java.lang.Integer (15)); 65 _methods.put ("register_subtran_aware", new java.lang.Integer (16)); 66 _methods.put ("rollback_only", new java.lang.Integer (17)); 67 _methods.put ("get_transaction_name", new java.lang.Integer (18)); 68 _methods.put ("create_subtransaction", new java.lang.Integer (19)); 69 _methods.put ("get_txcontext", new java.lang.Integer (20)); 70 } 71 72 public org.omg.CORBA.portable.OutputStream _invoke (String $method, 73 org.omg.CORBA.portable.InputStream in, 74 org.omg.CORBA.portable.ResponseHandler $rh) 75 { 76 org.omg.CORBA.portable.OutputStream out = null; 77 java.lang.Integer __method = (java.lang.Integer )_methods.get ($method); 78 if (__method == null) 79 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 80 81 switch (__method.intValue ()) 82 { 83 case 0: { 85 org.omg.CosTransactions.otid_t $result = null; 86 $result = this.getGlobalTID (); 87 out = $rh.createReply(); 88 org.omg.CosTransactions.otid_tHelper.write (out, $result); 89 break; 90 } 91 92 93 case 1: { 96 long $result = (long)0; 97 $result = this.getLocalTID (); 98 out = $rh.createReply(); 99 out.write_longlong ($result); 100 break; 101 } 102 103 104 case 2: { 107 org.omg.CosTransactions.TransIdentity $result[] = null; 108 $result = this.getAncestors (); 109 out = $rh.createReply(); 110 com.sun.jts.otsidl.TransAncestryHelper.write (out, $result); 111 break; 112 } 113 114 115 case 3: { 118 boolean $result = false; 119 $result = this.isRollbackOnly (); 120 out = $rh.createReply(); 121 out.write_boolean ($result); 122 break; 123 } 124 125 case 4: { 127 org.omg.CosTransactions.Status $result = null; 128 $result = this.get_status (); 129 out = $rh.createReply(); 130 org.omg.CosTransactions.StatusHelper.write (out, $result); 131 break; 132 } 133 134 case 5: { 136 org.omg.CosTransactions.Status $result = null; 137 $result = this.get_parent_status (); 138 out = $rh.createReply(); 139 org.omg.CosTransactions.StatusHelper.write (out, $result); 140 break; 141 } 142 143 case 6: { 145 org.omg.CosTransactions.Status $result = null; 146 $result = this.get_top_level_status (); 147 out = $rh.createReply(); 148 org.omg.CosTransactions.StatusHelper.write (out, $result); 149 break; 150 } 151 152 case 7: { 154 org.omg.CosTransactions.Coordinator tc = org.omg.CosTransactions.CoordinatorHelper.read (in); 155 boolean $result = false; 156 $result = this.is_same_transaction (tc); 157 out = $rh.createReply(); 158 out.write_boolean ($result); 159 break; 160 } 161 162 case 8: { 164 org.omg.CosTransactions.Coordinator tc = org.omg.CosTransactions.CoordinatorHelper.read (in); 165 boolean $result = false; 166 $result = this.is_related_transaction (tc); 167 out = $rh.createReply(); 168 out.write_boolean ($result); 169 break; 170 } 171 172 case 9: { 174 org.omg.CosTransactions.Coordinator tc = org.omg.CosTransactions.CoordinatorHelper.read (in); 175 boolean $result = false; 176 $result = this.is_ancestor_transaction (tc); 177 out = $rh.createReply(); 178 out.write_boolean ($result); 179 break; 180 } 181 182 case 10: { 184 org.omg.CosTransactions.Coordinator tc = org.omg.CosTransactions.CoordinatorHelper.read (in); 185 boolean $result = false; 186 $result = this.is_descendant_transaction (tc); 187 out = $rh.createReply(); 188 out.write_boolean ($result); 189 break; 190 } 191 192 case 11: { 194 boolean $result = false; 195 $result = this.is_top_level_transaction (); 196 out = $rh.createReply(); 197 out.write_boolean ($result); 198 break; 199 } 200 201 case 12: { 203 int $result = (int)0; 204 $result = this.hash_transaction (); 205 out = $rh.createReply(); 206 out.write_ulong ($result); 207 break; 208 } 209 210 case 13: { 212 int $result = (int)0; 213 $result = this.hash_top_level_tran (); 214 out = $rh.createReply(); 215 out.write_ulong ($result); 216 break; 217 } 218 219 case 14: { 221 try { 222 org.omg.CosTransactions.Resource r = org.omg.CosTransactions.ResourceHelper.read (in); 223 org.omg.CosTransactions.RecoveryCoordinator $result = null; 224 $result = this.register_resource (r); 225 out = $rh.createReply(); 226 org.omg.CosTransactions.RecoveryCoordinatorHelper.write (out, $result); 227 } catch (org.omg.CosTransactions.Inactive $ex) { 228 out = $rh.createExceptionReply (); 229 org.omg.CosTransactions.InactiveHelper.write (out, $ex); 230 } 231 break; 232 } 233 234 case 15: { 236 try { 237 org.omg.CosTransactions.Synchronization sync = org.omg.CosTransactions.SynchronizationHelper.read (in); 238 this.register_synchronization (sync); 239 out = $rh.createReply(); 240 } catch (org.omg.CosTransactions.Inactive $ex) { 241 out = $rh.createExceptionReply (); 242 org.omg.CosTransactions.InactiveHelper.write (out, $ex); 243 } catch (org.omg.CosTransactions.SynchronizationUnavailable $ex) { 244 out = $rh.createExceptionReply (); 245 org.omg.CosTransactions.SynchronizationUnavailableHelper.write (out, $ex); 246 } 247 break; 248 } 249 250 case 16: { 252 try { 253 org.omg.CosTransactions.SubtransactionAwareResource r = org.omg.CosTransactions.SubtransactionAwareResourceHelper.read (in); 254 this.register_subtran_aware (r); 255 out = $rh.createReply(); 256 } catch (org.omg.CosTransactions.Inactive $ex) { 257 out = $rh.createExceptionReply (); 258 org.omg.CosTransactions.InactiveHelper.write (out, $ex); 259 } catch (org.omg.CosTransactions.NotSubtransaction $ex) { 260 out = $rh.createExceptionReply (); 261 org.omg.CosTransactions.NotSubtransactionHelper.write (out, $ex); 262 } 263 break; 264 } 265 266 case 17: { 268 try { 269 this.rollback_only (); 270 out = $rh.createReply(); 271 } catch (org.omg.CosTransactions.Inactive $ex) { 272 out = $rh.createExceptionReply (); 273 org.omg.CosTransactions.InactiveHelper.write (out, $ex); 274 } 275 break; 276 } 277 278 case 18: { 280 String $result = null; 281 $result = this.get_transaction_name (); 282 out = $rh.createReply(); 283 out.write_string ($result); 284 break; 285 } 286 287 case 19: { 289 try { 290 org.omg.CosTransactions.Control $result = null; 291 $result = this.create_subtransaction (); 292 out = $rh.createReply(); 293 org.omg.CosTransactions.ControlHelper.write (out, $result); 294 } catch (org.omg.CosTransactions.SubtransactionsUnavailable $ex) { 295 out = $rh.createExceptionReply (); 296 org.omg.CosTransactions.SubtransactionsUnavailableHelper.write (out, $ex); 297 } catch (org.omg.CosTransactions.Inactive $ex) { 298 out = $rh.createExceptionReply (); 299 org.omg.CosTransactions.InactiveHelper.write (out, $ex); 300 } 301 break; 302 } 303 304 case 20: { 306 try { 307 org.omg.CosTransactions.PropagationContext $result = null; 308 $result = this.get_txcontext (); 309 out = $rh.createReply(); 310 org.omg.CosTransactions.PropagationContextHelper.write (out, $result); 311 } catch (org.omg.CosTransactions.Unavailable $ex) { 312 out = $rh.createExceptionReply (); 313 org.omg.CosTransactions.UnavailableHelper.write (out, $ex); 314 } 315 break; 316 } 317 318 default: 319 throw new org.omg.CORBA.BAD_OPERATION (0, org.omg.CORBA.CompletionStatus.COMPLETED_MAYBE); 320 } 321 322 return out; 323 } 325 private static String [] __ids = { 327 "IDL:otsidl/JCoordinator:1.0", 328 "IDL:omg.org/CosTransactions/Coordinator:1.0"}; 329 330 public String [] _all_interfaces (org.omg.PortableServer.POA poa, byte[] objectId) 331 { 332 return (String [])__ids.clone (); 333 } 334 335 public JCoordinator _this() 336 { 337 return JCoordinatorHelper.narrow( 338 super._this_object()); 339 } 340 341 public JCoordinator _this(org.omg.CORBA.ORB orb) 342 { 343 return JCoordinatorHelper.narrow( 344 super._this_object(orb)); 345 } 346 347 348 } | Popular Tags |