001 package org.omg.CosTransactions; 002 003 004 /** 005 * Generated from IDL interface "Current". 006 * 007 * @author JacORB IDL compiler V 2.3.0 (JBoss patch 6), 06-Jun-2007 008 * @version generated at Jun 18, 2012 10:37:00 AM 009 */ 010 011 public class _CurrentStub 012 extends org.omg.CORBA.portable.ObjectImpl 013 implements org.omg.CosTransactions.Current 014 { 015 private String[] ids = {"IDL:CosTransactions/Current:1.0","IDL:CORBA/Current:1.0"}; 016 public String[] _ids() 017 { 018 return ids; 019 } 020 021 public final static java.lang.Class _opsClass = org.omg.CosTransactions.CurrentOperations.class; 022 public org.omg.CosTransactions.Control suspend() 023 { 024 while(true) 025 { 026 if(! this._is_local()) 027 { 028 org.omg.CORBA.portable.InputStream _is = null; 029 try 030 { 031 org.omg.CORBA.portable.OutputStream _os = _request( "suspend", true); 032 _is = _invoke(_os); 033 org.omg.CosTransactions.Control _result = org.omg.CosTransactions.ControlHelper.read(_is); 034 return _result; 035 } 036 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 037 catch( org.omg.CORBA.portable.ApplicationException _ax ) 038 { 039 String _id = _ax.getId(); 040 throw new RuntimeException("Unexpected exception " + _id ); 041 } 042 finally 043 { 044 this._releaseReply(_is); 045 } 046 } 047 else 048 { 049 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "suspend", _opsClass ); 050 if( _so == null ) 051 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 052 CurrentOperations _localServant = (CurrentOperations)_so.servant; 053 org.omg.CosTransactions.Control _result; 054 try 055 { 056 _result = _localServant.suspend(); 057 } 058 finally 059 { 060 _servant_postinvoke(_so); 061 } 062 return _result; 063 } 064 065 } 066 067 } 068 069 public org.omg.CosTransactions.Status get_status() 070 { 071 while(true) 072 { 073 if(! this._is_local()) 074 { 075 org.omg.CORBA.portable.InputStream _is = null; 076 try 077 { 078 org.omg.CORBA.portable.OutputStream _os = _request( "get_status", true); 079 _is = _invoke(_os); 080 org.omg.CosTransactions.Status _result = org.omg.CosTransactions.StatusHelper.read(_is); 081 return _result; 082 } 083 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 084 catch( org.omg.CORBA.portable.ApplicationException _ax ) 085 { 086 String _id = _ax.getId(); 087 throw new RuntimeException("Unexpected exception " + _id ); 088 } 089 finally 090 { 091 this._releaseReply(_is); 092 } 093 } 094 else 095 { 096 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_status", _opsClass ); 097 if( _so == null ) 098 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 099 CurrentOperations _localServant = (CurrentOperations)_so.servant; 100 org.omg.CosTransactions.Status _result; 101 try 102 { 103 _result = _localServant.get_status(); 104 } 105 finally 106 { 107 _servant_postinvoke(_so); 108 } 109 return _result; 110 } 111 112 } 113 114 } 115 116 public void rollback() throws org.omg.CosTransactions.NoTransaction 117 { 118 while(true) 119 { 120 if(! this._is_local()) 121 { 122 org.omg.CORBA.portable.InputStream _is = null; 123 try 124 { 125 org.omg.CORBA.portable.OutputStream _os = _request( "rollback", true); 126 _is = _invoke(_os); 127 return; 128 } 129 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 130 catch( org.omg.CORBA.portable.ApplicationException _ax ) 131 { 132 String _id = _ax.getId(); 133 if( _id.equals("IDL:CosTransactions/NoTransaction:1.0")) 134 { 135 throw org.omg.CosTransactions.NoTransactionHelper.read(_ax.getInputStream()); 136 } 137 throw new RuntimeException("Unexpected exception " + _id ); 138 } 139 finally 140 { 141 this._releaseReply(_is); 142 } 143 } 144 else 145 { 146 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rollback", _opsClass ); 147 if( _so == null ) 148 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 149 CurrentOperations _localServant = (CurrentOperations)_so.servant; 150 try 151 { 152 _localServant.rollback(); 153 } 154 finally 155 { 156 _servant_postinvoke(_so); 157 } 158 return; 159 } 160 161 } 162 163 } 164 165 public void resume(org.omg.CosTransactions.Control which) throws org.omg.CosTransactions.InvalidControl 166 { 167 while(true) 168 { 169 if(! this._is_local()) 170 { 171 org.omg.CORBA.portable.InputStream _is = null; 172 try 173 { 174 org.omg.CORBA.portable.OutputStream _os = _request( "resume", true); 175 org.omg.CosTransactions.ControlHelper.write(_os,which); 176 _is = _invoke(_os); 177 return; 178 } 179 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 180 catch( org.omg.CORBA.portable.ApplicationException _ax ) 181 { 182 String _id = _ax.getId(); 183 if( _id.equals("IDL:CosTransactions/InvalidControl:1.0")) 184 { 185 throw org.omg.CosTransactions.InvalidControlHelper.read(_ax.getInputStream()); 186 } 187 throw new RuntimeException("Unexpected exception " + _id ); 188 } 189 finally 190 { 191 this._releaseReply(_is); 192 } 193 } 194 else 195 { 196 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "resume", _opsClass ); 197 if( _so == null ) 198 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 199 CurrentOperations _localServant = (CurrentOperations)_so.servant; 200 try 201 { 202 _localServant.resume(which); 203 } 204 finally 205 { 206 _servant_postinvoke(_so); 207 } 208 return; 209 } 210 211 } 212 213 } 214 215 public java.lang.String get_transaction_name() 216 { 217 while(true) 218 { 219 if(! this._is_local()) 220 { 221 org.omg.CORBA.portable.InputStream _is = null; 222 try 223 { 224 org.omg.CORBA.portable.OutputStream _os = _request( "get_transaction_name", true); 225 _is = _invoke(_os); 226 java.lang.String _result = _is.read_string(); 227 return _result; 228 } 229 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 230 catch( org.omg.CORBA.portable.ApplicationException _ax ) 231 { 232 String _id = _ax.getId(); 233 throw new RuntimeException("Unexpected exception " + _id ); 234 } 235 finally 236 { 237 this._releaseReply(_is); 238 } 239 } 240 else 241 { 242 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_transaction_name", _opsClass ); 243 if( _so == null ) 244 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 245 CurrentOperations _localServant = (CurrentOperations)_so.servant; 246 java.lang.String _result; 247 try 248 { 249 _result = _localServant.get_transaction_name(); 250 } 251 finally 252 { 253 _servant_postinvoke(_so); 254 } 255 return _result; 256 } 257 258 } 259 260 } 261 262 public void set_timeout(int seconds) 263 { 264 while(true) 265 { 266 if(! this._is_local()) 267 { 268 org.omg.CORBA.portable.InputStream _is = null; 269 try 270 { 271 org.omg.CORBA.portable.OutputStream _os = _request( "set_timeout", true); 272 _os.write_ulong(seconds); 273 _is = _invoke(_os); 274 return; 275 } 276 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 277 catch( org.omg.CORBA.portable.ApplicationException _ax ) 278 { 279 String _id = _ax.getId(); 280 throw new RuntimeException("Unexpected exception " + _id ); 281 } 282 finally 283 { 284 this._releaseReply(_is); 285 } 286 } 287 else 288 { 289 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "set_timeout", _opsClass ); 290 if( _so == null ) 291 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 292 CurrentOperations _localServant = (CurrentOperations)_so.servant; 293 try 294 { 295 _localServant.set_timeout(seconds); 296 } 297 finally 298 { 299 _servant_postinvoke(_so); 300 } 301 return; 302 } 303 304 } 305 306 } 307 308 public void commit(boolean report_heuristics) throws org.omg.CosTransactions.NoTransaction,org.omg.CosTransactions.HeuristicHazard,org.omg.CosTransactions.HeuristicMixed 309 { 310 while(true) 311 { 312 if(! this._is_local()) 313 { 314 org.omg.CORBA.portable.InputStream _is = null; 315 try 316 { 317 org.omg.CORBA.portable.OutputStream _os = _request( "commit", true); 318 _os.write_boolean(report_heuristics); 319 _is = _invoke(_os); 320 return; 321 } 322 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 323 catch( org.omg.CORBA.portable.ApplicationException _ax ) 324 { 325 String _id = _ax.getId(); 326 if( _id.equals("IDL:CosTransactions/NoTransaction:1.0")) 327 { 328 throw org.omg.CosTransactions.NoTransactionHelper.read(_ax.getInputStream()); 329 } 330 else if( _id.equals("IDL:CosTransactions/HeuristicHazard:1.0")) 331 { 332 throw org.omg.CosTransactions.HeuristicHazardHelper.read(_ax.getInputStream()); 333 } 334 else if( _id.equals("IDL:CosTransactions/HeuristicMixed:1.0")) 335 { 336 throw org.omg.CosTransactions.HeuristicMixedHelper.read(_ax.getInputStream()); 337 } 338 throw new RuntimeException("Unexpected exception " + _id ); 339 } 340 finally 341 { 342 this._releaseReply(_is); 343 } 344 } 345 else 346 { 347 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "commit", _opsClass ); 348 if( _so == null ) 349 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 350 CurrentOperations _localServant = (CurrentOperations)_so.servant; 351 try 352 { 353 _localServant.commit(report_heuristics); 354 } 355 finally 356 { 357 _servant_postinvoke(_so); 358 } 359 return; 360 } 361 362 } 363 364 } 365 366 public int get_timeout() 367 { 368 while(true) 369 { 370 if(! this._is_local()) 371 { 372 org.omg.CORBA.portable.InputStream _is = null; 373 try 374 { 375 org.omg.CORBA.portable.OutputStream _os = _request( "get_timeout", true); 376 _is = _invoke(_os); 377 int _result = _is.read_ulong(); 378 return _result; 379 } 380 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 381 catch( org.omg.CORBA.portable.ApplicationException _ax ) 382 { 383 String _id = _ax.getId(); 384 throw new RuntimeException("Unexpected exception " + _id ); 385 } 386 finally 387 { 388 this._releaseReply(_is); 389 } 390 } 391 else 392 { 393 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_timeout", _opsClass ); 394 if( _so == null ) 395 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 396 CurrentOperations _localServant = (CurrentOperations)_so.servant; 397 int _result; 398 try 399 { 400 _result = _localServant.get_timeout(); 401 } 402 finally 403 { 404 _servant_postinvoke(_so); 405 } 406 return _result; 407 } 408 409 } 410 411 } 412 413 public void rollback_only() throws org.omg.CosTransactions.NoTransaction 414 { 415 while(true) 416 { 417 if(! this._is_local()) 418 { 419 org.omg.CORBA.portable.InputStream _is = null; 420 try 421 { 422 org.omg.CORBA.portable.OutputStream _os = _request( "rollback_only", true); 423 _is = _invoke(_os); 424 return; 425 } 426 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 427 catch( org.omg.CORBA.portable.ApplicationException _ax ) 428 { 429 String _id = _ax.getId(); 430 if( _id.equals("IDL:CosTransactions/NoTransaction:1.0")) 431 { 432 throw org.omg.CosTransactions.NoTransactionHelper.read(_ax.getInputStream()); 433 } 434 throw new RuntimeException("Unexpected exception " + _id ); 435 } 436 finally 437 { 438 this._releaseReply(_is); 439 } 440 } 441 else 442 { 443 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "rollback_only", _opsClass ); 444 if( _so == null ) 445 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 446 CurrentOperations _localServant = (CurrentOperations)_so.servant; 447 try 448 { 449 _localServant.rollback_only(); 450 } 451 finally 452 { 453 _servant_postinvoke(_so); 454 } 455 return; 456 } 457 458 } 459 460 } 461 462 public org.omg.CosTransactions.Control get_control() 463 { 464 while(true) 465 { 466 if(! this._is_local()) 467 { 468 org.omg.CORBA.portable.InputStream _is = null; 469 try 470 { 471 org.omg.CORBA.portable.OutputStream _os = _request( "get_control", true); 472 _is = _invoke(_os); 473 org.omg.CosTransactions.Control _result = org.omg.CosTransactions.ControlHelper.read(_is); 474 return _result; 475 } 476 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 477 catch( org.omg.CORBA.portable.ApplicationException _ax ) 478 { 479 String _id = _ax.getId(); 480 throw new RuntimeException("Unexpected exception " + _id ); 481 } 482 finally 483 { 484 this._releaseReply(_is); 485 } 486 } 487 else 488 { 489 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "get_control", _opsClass ); 490 if( _so == null ) 491 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 492 CurrentOperations _localServant = (CurrentOperations)_so.servant; 493 org.omg.CosTransactions.Control _result; 494 try 495 { 496 _result = _localServant.get_control(); 497 } 498 finally 499 { 500 _servant_postinvoke(_so); 501 } 502 return _result; 503 } 504 505 } 506 507 } 508 509 public void begin() throws org.omg.CosTransactions.SubtransactionsUnavailable 510 { 511 while(true) 512 { 513 if(! this._is_local()) 514 { 515 org.omg.CORBA.portable.InputStream _is = null; 516 try 517 { 518 org.omg.CORBA.portable.OutputStream _os = _request( "begin", true); 519 _is = _invoke(_os); 520 return; 521 } 522 catch( org.omg.CORBA.portable.RemarshalException _rx ){} 523 catch( org.omg.CORBA.portable.ApplicationException _ax ) 524 { 525 String _id = _ax.getId(); 526 if( _id.equals("IDL:CosTransactions/SubtransactionsUnavailable:1.0")) 527 { 528 throw org.omg.CosTransactions.SubtransactionsUnavailableHelper.read(_ax.getInputStream()); 529 } 530 throw new RuntimeException("Unexpected exception " + _id ); 531 } 532 finally 533 { 534 this._releaseReply(_is); 535 } 536 } 537 else 538 { 539 org.omg.CORBA.portable.ServantObject _so = _servant_preinvoke( "begin", _opsClass ); 540 if( _so == null ) 541 throw new org.omg.CORBA.UNKNOWN("local invocations not supported!"); 542 CurrentOperations _localServant = (CurrentOperations)_so.servant; 543 try 544 { 545 _localServant.begin(); 546 } 547 finally 548 { 549 _servant_postinvoke(_so); 550 } 551 return; 552 } 553 554 } 555 556 } 557 558 }