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 _ControlImpl_Stub extends Stub implements Control, 24 Resource, 25 Coordinator, 26 Terminator , 27 RecoveryCoordinator { 28 29 private static final String [] _type_ids = { 30 "RMI:org.objectweb.jotm.ControlImpl:0000000000000000", 31 "RMI:org.objectweb.jotm.Control:0000000000000000", 32 "RMI:org.objectweb.jotm.Resource:0000000000000000", 33 "RMI:org.objectweb.jotm.Coordinator:0000000000000000", 34 "RMI:org.objectweb.jotm.Terminator:0000000000000000", 35 "RMI:org.objectweb.jotm.RecoveryCoordinator:0000000000000000" 36 }; 37 38 public String [] _ids() { 39 return _type_ids; 40 } 41 42 public Terminator get_terminator() throws RemoteException { 43 if (!Util.isLocal(this)) { 44 try { 45 org.omg.CORBA.portable.InputStream in = null; 46 try { 47 OutputStream out = _request("_get_J_terminator", true); 48 in = _invoke(out); 49 return (Terminator ) PortableRemoteObject.narrow(in.read_Object(), Terminator .class); 50 } catch (ApplicationException ex) { 51 in = ex.getInputStream(); 52 String id = in.read_string(); 53 throw new UnexpectedException (id); 54 } catch (RemarshalException ex) { 55 return get_terminator(); 56 } finally { 57 _releaseReply(in); 58 } 59 } catch (SystemException ex) { 60 throw Util.mapSystemException(ex); 61 } 62 } else { 63 ServantObject so = _servant_preinvoke("_get_J_terminator",ControlImpl.class); 64 if (so == null) { 65 return get_terminator(); 66 } 67 try { 68 Terminator result = ((ControlImpl)so.servant).get_terminator(); 69 return (Terminator )Util.copyObject(result,_orb()); 70 } catch (Throwable ex) { 71 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 72 throw Util.wrapException(exCopy); 73 } finally { 74 _servant_postinvoke(so); 75 } 76 } 77 } 78 79 public Coordinator get_coordinator() throws RemoteException { 80 if (!Util.isLocal(this)) { 81 try { 82 org.omg.CORBA.portable.InputStream in = null; 83 try { 84 OutputStream out = _request("_get_J_coordinator", true); 85 in = _invoke(out); 86 return (Coordinator) PortableRemoteObject.narrow(in.read_Object(), Coordinator.class); 87 } catch (ApplicationException ex) { 88 in = ex.getInputStream(); 89 String id = in.read_string(); 90 throw new UnexpectedException (id); 91 } catch (RemarshalException ex) { 92 return get_coordinator(); 93 } finally { 94 _releaseReply(in); 95 } 96 } catch (SystemException ex) { 97 throw Util.mapSystemException(ex); 98 } 99 } else { 100 ServantObject so = _servant_preinvoke("_get_J_coordinator",ControlImpl.class); 101 if (so == null) { 102 return get_coordinator(); 103 } 104 try { 105 Coordinator result = ((ControlImpl)so.servant).get_coordinator(); 106 return (Coordinator)Util.copyObject(result,_orb()); 107 } catch (Throwable ex) { 108 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 109 throw Util.wrapException(exCopy); 110 } finally { 111 _servant_postinvoke(so); 112 } 113 } 114 } 115 116 public int prepare() throws RemoteException { 117 if (!Util.isLocal(this)) { 118 try { 119 org.omg.CORBA.portable.InputStream in = null; 120 try { 121 OutputStream out = _request("prepare", true); 122 in = _invoke(out); 123 return in.read_long(); 124 } catch (ApplicationException ex) { 125 in = ex.getInputStream(); 126 String id = in.read_string(); 127 throw new UnexpectedException (id); 128 } catch (RemarshalException ex) { 129 return prepare(); 130 } finally { 131 _releaseReply(in); 132 } 133 } catch (SystemException ex) { 134 throw Util.mapSystemException(ex); 135 } 136 } else { 137 ServantObject so = _servant_preinvoke("prepare",ControlImpl.class); 138 if (so == null) { 139 return prepare(); 140 } 141 try { 142 return ((ControlImpl)so.servant).prepare(); 143 } catch (Throwable ex) { 144 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 145 throw Util.wrapException(exCopy); 146 } finally { 147 _servant_postinvoke(so); 148 } 149 } 150 } 151 152 public void rollback() throws RemoteException { 153 if (!Util.isLocal(this)) { 154 try { 155 org.omg.CORBA.portable.InputStream in = null; 156 try { 157 OutputStream out = _request("rollback", true); 158 _invoke(out); 159 } catch (ApplicationException ex) { 160 in = ex.getInputStream(); 161 String id = in.read_string(); 162 throw new UnexpectedException (id); 163 } catch (RemarshalException ex) { 164 rollback(); 165 } finally { 166 _releaseReply(in); 167 } 168 } catch (SystemException ex) { 169 throw Util.mapSystemException(ex); 170 } 171 } else { 172 ServantObject so = _servant_preinvoke("rollback",ControlImpl.class); 173 if (so == null) { 174 rollback(); 175 return ; 176 } 177 try { 178 ((ControlImpl)so.servant).rollback(); 179 } catch (Throwable ex) { 180 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 181 throw Util.wrapException(exCopy); 182 } finally { 183 _servant_postinvoke(so); 184 } 185 } 186 } 187 188 public void commit() throws RemoteException { 189 if (!Util.isLocal(this)) { 190 try { 191 org.omg.CORBA.portable.InputStream in = null; 192 try { 193 OutputStream out = _request("commit__", true); 194 _invoke(out); 195 } catch (ApplicationException ex) { 196 in = ex.getInputStream(); 197 String id = in.read_string(); 198 throw new UnexpectedException (id); 199 } catch (RemarshalException ex) { 200 commit(); 201 } finally { 202 _releaseReply(in); 203 } 204 } catch (SystemException ex) { 205 throw Util.mapSystemException(ex); 206 } 207 } else { 208 ServantObject so = _servant_preinvoke("commit__",ControlImpl.class); 209 if (so == null) { 210 commit(); 211 return ; 212 } 213 try { 214 ((ControlImpl)so.servant).commit(); 215 } catch (Throwable ex) { 216 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 217 throw Util.wrapException(exCopy); 218 } finally { 219 _servant_postinvoke(so); 220 } 221 } 222 } 223 224 public void commit_one_phase() throws RemoteException { 225 if (!Util.isLocal(this)) { 226 try { 227 org.omg.CORBA.portable.InputStream in = null; 228 try { 229 OutputStream out = _request("commit_one_phase", true); 230 _invoke(out); 231 } catch (ApplicationException ex) { 232 in = ex.getInputStream(); 233 String id = in.read_string(); 234 throw new UnexpectedException (id); 235 } catch (RemarshalException ex) { 236 commit_one_phase(); 237 } finally { 238 _releaseReply(in); 239 } 240 } catch (SystemException ex) { 241 throw Util.mapSystemException(ex); 242 } 243 } else { 244 ServantObject so = _servant_preinvoke("commit_one_phase",ControlImpl.class); 245 if (so == null) { 246 commit_one_phase(); 247 return ; 248 } 249 try { 250 ((ControlImpl)so.servant).commit_one_phase(); 251 } catch (Throwable ex) { 252 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 253 throw Util.wrapException(exCopy); 254 } finally { 255 _servant_postinvoke(so); 256 } 257 } 258 } 259 260 public void forget() throws RemoteException { 261 if (!Util.isLocal(this)) { 262 try { 263 org.omg.CORBA.portable.InputStream in = null; 264 try { 265 OutputStream out = _request("forget", true); 266 _invoke(out); 267 } catch (ApplicationException ex) { 268 in = ex.getInputStream(); 269 String id = in.read_string(); 270 throw new UnexpectedException (id); 271 } catch (RemarshalException ex) { 272 forget(); 273 } finally { 274 _releaseReply(in); 275 } 276 } catch (SystemException ex) { 277 throw Util.mapSystemException(ex); 278 } 279 } else { 280 ServantObject so = _servant_preinvoke("forget",ControlImpl.class); 281 if (so == null) { 282 forget(); 283 return ; 284 } 285 try { 286 ((ControlImpl)so.servant).forget(); 287 } catch (Throwable ex) { 288 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 289 throw Util.wrapException(exCopy); 290 } finally { 291 _servant_postinvoke(so); 292 } 293 } 294 } 295 296 public int get_status() throws RemoteException { 297 if (!Util.isLocal(this)) { 298 try { 299 org.omg.CORBA.portable.InputStream in = null; 300 try { 301 OutputStream out = _request("_get_J_status", true); 302 in = _invoke(out); 303 return in.read_long(); 304 } catch (ApplicationException ex) { 305 in = ex.getInputStream(); 306 String id = in.read_string(); 307 throw new UnexpectedException (id); 308 } catch (RemarshalException ex) { 309 return get_status(); 310 } finally { 311 _releaseReply(in); 312 } 313 } catch (SystemException ex) { 314 throw Util.mapSystemException(ex); 315 } 316 } else { 317 ServantObject so = _servant_preinvoke("_get_J_status",ControlImpl.class); 318 if (so == null) { 319 return get_status(); 320 } 321 try { 322 return ((ControlImpl)so.servant).get_status(); 323 } catch (Throwable ex) { 324 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 325 throw Util.wrapException(exCopy); 326 } finally { 327 _servant_postinvoke(so); 328 } 329 } 330 } 331 332 public boolean is_same_transaction(Coordinator arg0) throws RemoteException { 333 if (!Util.isLocal(this)) { 334 try { 335 org.omg.CORBA.portable.InputStream in = null; 336 try { 337 OutputStream out = _request("is_same_transaction", true); 338 Util.writeRemoteObject(out,arg0); 339 in = _invoke(out); 340 return in.read_boolean(); 341 } catch (ApplicationException ex) { 342 in = ex.getInputStream(); 343 String id = in.read_string(); 344 throw new UnexpectedException (id); 345 } catch (RemarshalException ex) { 346 return is_same_transaction(arg0); 347 } finally { 348 _releaseReply(in); 349 } 350 } catch (SystemException ex) { 351 throw Util.mapSystemException(ex); 352 } 353 } else { 354 ServantObject so = _servant_preinvoke("is_same_transaction",ControlImpl.class); 355 if (so == null) { 356 return is_same_transaction(arg0); 357 } 358 try { 359 Coordinator arg0Copy = (Coordinator) Util.copyObject(arg0,_orb()); 360 return ((ControlImpl)so.servant).is_same_transaction(arg0Copy); 361 } catch (Throwable ex) { 362 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 363 throw Util.wrapException(exCopy); 364 } finally { 365 _servant_postinvoke(so); 366 } 367 } 368 } 369 370 public RecoveryCoordinator register_resource(Resource arg0) throws RemoteException { 371 if (!Util.isLocal(this)) { 372 try { 373 org.omg.CORBA.portable.InputStream in = null; 374 try { 375 OutputStream out = _request("register_resource", true); 376 Util.writeRemoteObject(out,arg0); 377 in = _invoke(out); 378 return (RecoveryCoordinator) PortableRemoteObject.narrow(in.read_Object(), RecoveryCoordinator.class); 379 } catch (ApplicationException ex) { 380 in = ex.getInputStream(); 381 String id = in.read_string(); 382 throw new UnexpectedException (id); 383 } catch (RemarshalException ex) { 384 return register_resource(arg0); 385 } finally { 386 _releaseReply(in); 387 } 388 } catch (SystemException ex) { 389 throw Util.mapSystemException(ex); 390 } 391 } else { 392 ServantObject so = _servant_preinvoke("register_resource",ControlImpl.class); 393 if (so == null) { 394 return register_resource(arg0); 395 } 396 try { 397 Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb()); 398 RecoveryCoordinator result = ((ControlImpl)so.servant).register_resource(arg0Copy); 399 return (RecoveryCoordinator)Util.copyObject(result,_orb()); 400 } catch (Throwable ex) { 401 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 402 throw Util.wrapException(exCopy); 403 } finally { 404 _servant_postinvoke(so); 405 } 406 } 407 } 408 409 public void register_synchronization(RemoteSynchro arg0) throws RemoteException { 410 if (!Util.isLocal(this)) { 411 try { 412 org.omg.CORBA.portable.InputStream in = null; 413 try { 414 OutputStream out = _request("register_synchronization", true); 415 Util.writeRemoteObject(out,arg0); 416 _invoke(out); 417 } catch (ApplicationException ex) { 418 in = ex.getInputStream(); 419 String id = in.read_string(); 420 throw new UnexpectedException (id); 421 } catch (RemarshalException ex) { 422 register_synchronization(arg0); 423 } finally { 424 _releaseReply(in); 425 } 426 } catch (SystemException ex) { 427 throw Util.mapSystemException(ex); 428 } 429 } else { 430 ServantObject so = _servant_preinvoke("register_synchronization",ControlImpl.class); 431 if (so == null) { 432 register_synchronization(arg0); 433 return ; 434 } 435 try { 436 RemoteSynchro arg0Copy = (RemoteSynchro) Util.copyObject(arg0,_orb()); 437 ((ControlImpl)so.servant).register_synchronization(arg0Copy); 438 } catch (Throwable ex) { 439 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 440 throw Util.wrapException(exCopy); 441 } finally { 442 _servant_postinvoke(so); 443 } 444 } 445 } 446 447 public void rollback_only() throws RemoteException { 448 if (!Util.isLocal(this)) { 449 try { 450 org.omg.CORBA.portable.InputStream in = null; 451 try { 452 OutputStream out = _request("rollback_only", true); 453 _invoke(out); 454 } catch (ApplicationException ex) { 455 in = ex.getInputStream(); 456 String id = in.read_string(); 457 throw new UnexpectedException (id); 458 } catch (RemarshalException ex) { 459 rollback_only(); 460 } finally { 461 _releaseReply(in); 462 } 463 } catch (SystemException ex) { 464 throw Util.mapSystemException(ex); 465 } 466 } else { 467 ServantObject so = _servant_preinvoke("rollback_only",ControlImpl.class); 468 if (so == null) { 469 rollback_only(); 470 return ; 471 } 472 try { 473 ((ControlImpl)so.servant).rollback_only(); 474 } catch (Throwable ex) { 475 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 476 throw Util.wrapException(exCopy); 477 } finally { 478 _servant_postinvoke(so); 479 } 480 } 481 } 482 483 public String get_transaction_name() throws RemoteException { 484 if (!Util.isLocal(this)) { 485 try { 486 org.omg.CORBA_2_3.portable.InputStream in = null; 487 try { 488 OutputStream out = _request("_get_J_transaction_name", true); 489 in = (org.omg.CORBA_2_3.portable.InputStream )_invoke(out); 490 return (String ) in.read_value(String .class); 491 } catch (ApplicationException ex) { 492 in = (org.omg.CORBA_2_3.portable.InputStream ) ex.getInputStream(); 493 String id = in.read_string(); 494 throw new UnexpectedException (id); 495 } catch (RemarshalException ex) { 496 return get_transaction_name(); 497 } finally { 498 _releaseReply(in); 499 } 500 } catch (SystemException ex) { 501 throw Util.mapSystemException(ex); 502 } 503 } else { 504 ServantObject so = _servant_preinvoke("_get_J_transaction_name",ControlImpl.class); 505 if (so == null) { 506 return get_transaction_name(); 507 } 508 try { 509 return ((ControlImpl)so.servant).get_transaction_name(); 510 } catch (Throwable ex) { 511 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 512 throw Util.wrapException(exCopy); 513 } finally { 514 _servant_postinvoke(so); 515 } 516 } 517 } 518 519 public void commit(boolean arg0) throws RemoteException { 520 if (!Util.isLocal(this)) { 521 try { 522 org.omg.CORBA.portable.InputStream in = null; 523 try { 524 OutputStream out = _request("commit__boolean", true); 525 out.write_boolean(arg0); 526 _invoke(out); 527 } catch (ApplicationException ex) { 528 in = ex.getInputStream(); 529 String id = in.read_string(); 530 throw new UnexpectedException (id); 531 } catch (RemarshalException ex) { 532 commit(arg0); 533 } finally { 534 _releaseReply(in); 535 } 536 } catch (SystemException ex) { 537 throw Util.mapSystemException(ex); 538 } 539 } else { 540 ServantObject so = _servant_preinvoke("commit__boolean",ControlImpl.class); 541 if (so == null) { 542 commit(arg0); 543 return ; 544 } 545 try { 546 ((ControlImpl)so.servant).commit(arg0); 547 } catch (Throwable ex) { 548 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 549 throw Util.wrapException(exCopy); 550 } finally { 551 _servant_postinvoke(so); 552 } 553 } 554 } 555 556 public int replay_completion(Resource arg0) throws RemoteException { 557 if (!Util.isLocal(this)) { 558 try { 559 org.omg.CORBA.portable.InputStream in = null; 560 try { 561 OutputStream out = _request("replay_completion", true); 562 Util.writeRemoteObject(out,arg0); 563 in = _invoke(out); 564 return in.read_long(); 565 } catch (ApplicationException ex) { 566 in = ex.getInputStream(); 567 String id = in.read_string(); 568 throw new UnexpectedException (id); 569 } catch (RemarshalException ex) { 570 return replay_completion(arg0); 571 } finally { 572 _releaseReply(in); 573 } 574 } catch (SystemException ex) { 575 throw Util.mapSystemException(ex); 576 } 577 } else { 578 ServantObject so = _servant_preinvoke("replay_completion",ControlImpl.class); 579 if (so == null) { 580 return replay_completion(arg0); 581 } 582 try { 583 Resource arg0Copy = (Resource) Util.copyObject(arg0,_orb()); 584 return ((ControlImpl)so.servant).replay_completion(arg0Copy); 585 } catch (Throwable ex) { 586 Throwable exCopy = (Throwable )Util.copyObject(ex,_orb()); 587 throw Util.wrapException(exCopy); 588 } finally { 589 _servant_postinvoke(so); 590 } 591 } 592 } 593 } 594 | Popular Tags |